Re: [PATCH] calculate the maximal number of revisions to test

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

 



Hi gene099,

> the subject really could use a "bisect:" prefix, and maybe be a little 
> clearer to begin with? Imagine how much sense it makes to read the commit 
> messages, and see that some maximal number of revisions is calculated.
OK, you're right.  I think the patch is not as complete as it could be.
I will fix that and resend with a better log.
 
> > diff --git a/git-bisect.sh b/git-bisect.sh
> > index b1c3a6b..a5b4fdd 100755
> > --- a/git-bisect.sh
> > +++ b/git-bisect.sh
> > @@ -150,8 +150,14 @@ bisect_next() {
> >  	    git-diff-tree --pretty $rev
> >  	    exit 0
> >  	fi
> > -	nr=$(eval "git-rev-list $rev $good -- $(cat $GIT_DIR/BISECT_NAMES)" | wc -l) || exit
> > -	echo "Bisecting: $nr revisions left to test after this"
> > +	nr_bad=$(eval "git-rev-list $rev^ $good -- $(cat $GIT_DIR/BISECT_NAMES)" | wc -l) || exit
> > +	nr_good=$(eval "git-rev-list $bad^ ^$rev $good -- $(cat $GIT_DIR/BISECT_NAMES)" | wc -l) || exit
> > +	if test "$nr_bad" -ge "$nr_good"; then
> > +		nr="$nr_bad";
> > +	else
> > +		nr="$nr_good";
> > +	fi;
> > +	echo "Bisecting: maximal $nr revisions left to test after this"
> 
> How about this instead:
> 
> -	echo "Bisecting: $nr revisions left to test after this"
> +	echo "Bisecting: approx. $nr revisions left to test after this"
> 
> since your version is an approximation (although a conservative one) 
> anyway. Hmm?
I prefer a wording that points out a maximum.  Earlier today I thougt
about this, too, but currently I don't remember my alternative.

Best regards
Uwe

-- 
Uwe Kleine-König

http://www.google.com/search?q=12+divided+by+3
-
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]