Re: Article about "git bisect run" on LWN
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Feb 9, 2009, 13:15 UTC
- Message-ID
- <alpine.DEB.1.00.0902091414310.10279@pacific.mpi-cbg.de>
- In-Reply-To
- <20090209121943.GG17782@elte.hu>
Hi,
On Mon, 9 Feb 2009, Ingo Molnar wrote:
Show 28 quoted lines
> * Junio C Hamano <gitster@pobox.com> wrote: > > > David Symonds <dsymonds@gmail.com> writes: > > > > > On Sat, Feb 7, 2009 at 3:41 PM, Christian Couder > > > <chriscool@tuxfamily.org> wrote: > > > > > >> It might be useful to have a list of always good commits too, and use it > > >> like this: > > >> > > >> $ git bisect start <bad> <good> $(cat always_good.txt) > > >> $ git bisect skip $(cat always_skipped.txt) > > >> $ git bisect run ./my_test_script.sh > > > > > > Your test script could just do this at its start instead: > > > > > > if cat always_good.txt | grep $(rev-parse HEAD); then > > > exit 0 > > > elif cat always_skipped.txt | grep $(rev-parse HEAD); then > > > exit 125 > > > fi > > > > Don't cat a file into grep, please. > > I do it all the time not because i dont know about grep's ability > to take a file parameter, but because this way it's just a > special-case of command piping and i can inject other commands as > i extend/edit the command line interactively, etc.
I think Junio meant using '< $file' type redirection, to avoid an unnecessary fork(). (Good habit, avoiding fork()s...)
Ciao, Dscho