Re: [PATCH] Bisect: add checks at the beginning of "git bisect run".

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le mercredi 28 mars 2007 07:46, Junio C Hamano a écrit :
> >
> > --not
> > mark current revision as bad instead of good and as good instead of bad
>
> Do you mean this is a useful option when the "run-script"
> reports failure with 0 exit and success with non-zero exit?  In
> other words, exit code has reversed meanings from the usual?

Yes, for example to find when a string first appeared in a file one could 
use:

git bisect run --not grep string my_file

instead of something like

git bisect run ! grep string my_file

or

git bisect run 'grep string my_file ; test $? -ne 0'

> > --good <rev1>
> > --bad <rev2>
> > use rev1 as good and rev2 as bad
>
> I am not sure what you mean by these two.

For example one could write:

git bisect run --good rev1 --bad rev2 my_script

instead of

git bisect start
git bisect good rev1
git bisect bad rev2
git bisect run my_script

> > --check or --test
> > run the script once and then do nothing if the result is good
>
> How would you use this? 

For example if you know that the last nightly build 
tagged "nightly_2007_03_27" was ok, you could use:

git bisect start
git bisect good nightly_2007_03_27
git bisect run --check make > /dev/null || {
	# extract commit and author email address from "$GIT_DIR/BISECT_RUN"
	# and send flame to author who broke the build with the commit
}

to automatically check that current source code builds ok.

Or you could use it in some test suites to automatically find the first bad 
commit (and be able to flame the author :-) in case one test fails.

Christian.

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]