git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Christian Couder <chriscool@tuxfamily.org>
Cc: Junio Hamano <junkio@cox.net>, git@vger.kernel.org
Subject: Re: [PATCH 2/2] Bisect: implement "bisect dunno" to mark untestable revisions.
Date: Mon, 8 Oct 2007 06:36:52 +0100 (BST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0710080632510.4174@racer.site> (raw)
In-Reply-To: <200710080734.23878.chriscool@tuxfamily.org>

Hi,

On Mon, 8 Oct 2007, Christian Couder wrote:

> Le lundi 8 octobre 2007, Johannes Schindelin a ?crit :
>
> > On Mon, 8 Oct 2007, Christian Couder wrote:
> > > diff --git a/git-bisect.sh b/git-bisect.sh
> > > index 388887a..c556318 100755
> > > --- a/git-bisect.sh
> > > +++ b/git-bisect.sh
> > > @@ -143,7 +145,7 @@ bisect_write_bad() {
> > >
> > >  bisect_good() {
> > >  	bisect_autostart
> > > -        case "$#" in
> > > +	case "$#" in
> >
> > White space breakage.
> 
> The patch tries to fix some white space breakages.
> 
> > > @@ -153,7 +155,6 @@ bisect_good() {
> > >  		rev=$(git rev-parse --verify "$rev^{commit}") || exit
> > >  		bisect_write_good "$rev"
> > >  		echo "git-bisect good $rev" >>"$GIT_DIR/BISECT_LOG"
> > > -
> >
> > ?
> 
> It also removes this unneeded blank line.

Both laudable changes; alas, they distracted me.

> > > @@ -164,6 +165,28 @@ bisect_write_good() {
> > >  	echo "# good: "$(git show-branch $rev) >>"$GIT_DIR/BISECT_LOG"
> > >  }
> > >
> > > +bisect_dunno() {
> > > +	bisect_autostart
> > > +	case "$#" in
> > > +	0)    revs=$(git rev-parse --verify HEAD) || exit ;;
> > > +	*)    revs=$(git rev-parse --revs-only --no-flags "$@") &&
> > > +		test '' != "$revs" || die "Bad rev input: $@" ;;
> > > +	esac
> > > +	for rev in $revs
> > > +	do
> > > +		rev=$(git rev-parse --verify "$rev^{commit}") || exit
> > > +		bisect_write_dunno "$rev"
> > > +		echo "git-bisect dunno $rev" >>"$GIT_DIR/BISECT_LOG"
> >
> > Should the last line not be put into bisect_write_dunno?  OTOH this is
> > the only call site of that function, so I strongly doubt that the
> > function (consisting of 3 lines, where the first is 'rev="$1"') is
> > necessary at all.
> 
> Well, there are "bisect_write_bad" and "bisect_write_good" that already 
> do the same thing as "bisect_write_dunno". In fact I thought that it was 
> better to just copy "bisect_dunno" from "bisect_good" and 
> "bisect_write_dunno" from "bisect_write_good".

If they also are called by just one site, and also do not do the complete 
printing to the log in the function (but also in the caller), I think they 
are not really worth it, either.

> If needed I can send another patch to factorise these functions.

That's not up to me to decide.  I'm just saying what I dislike.

Please do not take my criticism as a sign of a personal attack; if I did 
not find your patch worthwhile, I would not bother to respond.  So in a 
way, it is my way to show my appreciation for your work that I review and 
criticize it; for efficiency, I do not mention what I like ;-)

Ciao,
Dscho

      reply	other threads:[~2007-10-08  5:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-08  3:34 [PATCH 2/2] Bisect: implement "bisect dunno" to mark untestable revisions Christian Couder
2007-10-08  3:49 ` Johannes Schindelin
2007-10-08  5:34   ` Christian Couder
2007-10-08  5:36     ` Johannes Schindelin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0710080632510.4174@racer.site \
    --to=johannes.schindelin@gmx.de \
    --cc=chriscool@tuxfamily.org \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).