git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Trevor Saunders <tbsaunde@tbsaunde.org>,
	git@vger.kernel.org,
	Christian Couder <christian.couder@gmail.com>
Subject: Re: [PATCH v2] bisect: improve output when bad commit is found
Date: Tue, 12 May 2015 21:36:37 -0400	[thread overview]
Message-ID: <20150513013637.GB3066@peff.net> (raw)
In-Reply-To: <xmqqoalpcm9f.fsf@gitster.dls.corp.google.com>

On Tue, May 12, 2015 at 06:13:48PM -0700, Junio C Hamano wrote:

> >> See $gmane/268881
> >
> > Well, technically he just said it might be that people are parsing the
> > output and could be broken, but if you'd rather not take that risk then
> > I guess we just have to leave things the way they are.
> 
> FWIW.
> 
>  - I personally do not agree that those who scripted around "git
>    bisect" (as opposed to those who wrote scripts to be driven by
>    the "bisect run" interface) are worth worrying about.  But I am
>    not the whole of the Git world ;-)

It is not clear to me that people are actually scripting around the
output. Between the exit code and the stable output in BISECT_LOG, that
seems like a much more preferable way for scripted uses to find out what
happened.

Of course, that is not a guarantee that nobody scraped stderr, but at
least it makes me feel better that they're Doing It Wrong. :)

It would be nice if we had some actual data points. I followed the link
Christian gave to Ingo's old post, but I didn't see the actual script
there. There is:

  https://github.com/grosser/git-autobisect/blob/master/lib/git/autobisect.rb

which does seem to scrape stderr. Bleh.

>  - I _do_ think diff-tree --raw output without recursive is silly.
>    It is not useful for humans (it doesn't even give paths fully),
>    and it is insufficient for scripts, which can grok more through
>    information out of the 40-hex.
> 
> So perhaps if we keep
> 
> 	<40 char sha1> is the first bad commit
> 
> and then replace the diff-tree output with "show -s", then the
> result would be good enough, I would say.

That seems like a reasonable first step, at the very least. I wonder if
we should also better document the exit code and BISECT_LOG semantics,
and explicitly tell people not to scrape stderr. That at least frees us
up later to change the output as we see fit (I notice that most of the
messages in the script are already i18n'd; the ones from bisect--helper
are the odd ones out).

-Peff

  reply	other threads:[~2015-05-13  1:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-12 23:19 [PATCH v2] bisect: improve output when bad commit is found Trevor Saunders
2015-05-12 23:24 ` Junio C Hamano
2015-05-13  0:54   ` Trevor Saunders
2015-05-13  1:13     ` Junio C Hamano
2015-05-13  1:36       ` Jeff King [this message]
2015-05-13  5:48         ` Junio C Hamano
2015-05-13  9:39         ` Christian Couder
2015-05-13 21:42           ` Jeff King
2015-05-13  9:10       ` Christian Couder
2015-05-13 17:25         ` Trevor Saunders

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=20150513013637.GB3066@peff.net \
    --to=peff@peff.net \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=tbsaunde@tbsaunde.org \
    /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).