Johannes Schindelin <[email protected]> writes:
>> Most TEST_ environment variables that git respects are under
>> GIT_TEST_* --- e.g., GIT_TEST_OPTS. Should this match that pattern
>> as well, for easier debugging with commands like 'env | grep GIT_'?
>
> I dunno. This variable is most useful when inserted into the shell scripts
> in t/ themselves, not when specified via the command line. For example, if
> you have something like
>
> test_expect_success '123' '
> ...
> # This Git call somehow fails and I have no clue why
> git push remote HEAD
> ...
> '
>
> then prefixing the `git push` command with `TEST_GDB_GIT=1` lets you use
> `gdb` when running the test with the `-i` and `-v` flags.
>
> Please note that `TEST_GDB_GIT` is already a major step up from my initial
> `DDD`.
Yeah, that was my first reaction when I saw this patch. Instead of
having to munge that line to "gdb -whatever-args git", you can do a
single-shot debugging in a convenient way. And quite honestly,
because nobody sane will run:
$ cd t && TEST_GDB_GIT=1 sh ./t1234-frotz.sh
and can drive all the "git" running under gdb at the same time, I
think what you showed would be the _only_ practical use case. I
would have thought that TEST_GDB_GIT was way too long (and so is
GIT_TEST_GDB) and was about to suggest using something short and
sweet, even shorter than DDD, that you can easily add and remove.
It can be called GDB=1, perhaps?
I agree with all other points Jonathan made in his review, including
"Neat." part ;-)
Thanks.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html