Re: [PATCH 6/7] Bisect: factorise "bisect_{bad,good,dunno}" into "bisect_state".

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

 



Hi,

On Mon, 15 Oct 2007, Christian Couder wrote:

> Le dimanche 14 octobre 2007, Johannes Schindelin a ?crit :
>
> > On Sun, 14 Oct 2007, Christian Couder wrote:
> > > -bisect_bad() {
> > > +bisect_state() {
> > >  	bisect_autostart
> > > -	case "$#" in
> > > -	0)
> > > -		rev=$(git rev-parse --verify HEAD) ;;
> > > -	1)
> > > -		rev=$(git rev-parse --verify "$1^{commit}") ;;
> > > +	state=$1
> > > +	case "$#,$state" in
> > > +	0,*)
> > > +		die "Please call 'bisect_state' with at least one argument." ;;
> > > +	1,bad|1,good|1,dunno)
> > > +		rev=$(git rev-parse --verify HEAD) ||
> > > +			die "Bad rev input: HEAD"
> > > +		bisect_write "$state" "$rev" ;;
> > > +	2,bad)
> > > +		rev=$(git rev-parse --verify "$2^{commit}") ||
> > > +			die "Bad rev input: $2"
> > > +		bisect_write "$state" "$rev" ;;
> >
> > Really?  As far as I see, "2,bad" is an error in the current bisect.
> 
> But the new "bisect_state" takes one more argument, because the first 
> one must be "good" "bad" or "dunno".
> 
> So when there is only one argument HEAD is used, and when there are 2 
> arguments, $2 is used as the good|bad|dunno rev.

Ah, that explains it!  But do you not need to do "2,bad|2,good|2,dunno" in 
that case?  Or even better: "2,*"?

Thanks,
Dscho

-
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]

  Powered by Linux