Re: debugging git tests, was: Re: [PATCH v4 2/8] t5520: test no merge candidates cases
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- May 19, 2015, 13:29 UTC
- Message-ID
- <1254ff617c50077dc0c08321f168c4ce@www.dscho.org>
- In-Reply-To
- <20150518185554.GB11463@peff.net>
Hi Peff,
On 2015-05-18 20:55, Jeff King wrote:
Show 5 quoted lines
> As a side note, I've also considered better support for running the > debugger on git commands inside a test (right now, I usually stick a > "gdb --args" in the pipeline, but you have to remember to run with "-v", > and to redirect stdin appropriately). Do other people have this > annoyance, too?
Yes, I have that annoyance, and I usually want to debug one very specific Git call in that script. Therefore, I made this patch:
https://github.com/git-for-windows/git/commit/0f50fd723beb5d27d2d799ef3a0cfc0b0bbd80a8
It really served me well during the past four months of Git for Windows 2.x work. Of course I also had to avoid the redirection:
https://github.com/git-for-windows/git/commit/d27cb6e0572475582677724545a71755d171ea76
So what I do these days is to run the failing test with `TEST_NO_REDIRECT=1` and with the Git call I want to debug prefixed with `TEST_GDB_GIT=1`.
Ciao, Dscho