From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Christian Couder <christian.couder@gmail.com>,
Bartosz Baranowski <bbaranow@redhat.com>,
git@vger.kernel.org
Subject: Re: [PATCH 3/3] bisect: make diff-tree output prettier
Date: Sat, 23 Feb 2019 08:44:53 -0500 [thread overview]
Message-ID: <20190223134452.GE22403@sigill.intra.peff.net> (raw)
In-Reply-To: <xmqqsgwfr9vr.fsf@gitster-ct.c.googlers.com>
On Fri, Feb 22, 2019 at 09:49:44AM -0800, Junio C Hamano wrote:
> > Even though bisect might be driven by scripts, there's no reason to
> > consider this part of the output as machine-readable (if anything, the
> > initial "$hash is the first bad commit" might be parsed, but we won't
> > touch that here). Let's make it prettier and more informative for a
> > human reading the output.
>
> Sounds very sensible. One potential point that makes me worried is
> this move might tempt people to make the output even larger (e.g. a
> full diff with "--patch" is overkill if done unconditionally).
Yeah, I agree that would be overkill. What I have here isn't actually
much bigger. It mostly trades one line of --raw for one line of --stat.
The big change is that we actually bother to recurse, but I think the
old behavior was just buggy.
At any rate, I think we can discuss such a patch if and when it comes
up.
> > If we do care about the change in exit code from bisect, then it
> > probably does make sense to go with an external process. Then it can
> > happily die on the corruption, while bisect continues with the rest of
> > the high-level operation. I'm not sure it really matters much, though.
> > Once your repository is corrupted, all bets are off. It's nice that we
> > can bisect in such a state at all.
>
> This is about showing the very final message after finding which one
> is the culprit. Is there any other "clean-up" action we need to do
> after showing the message? I do not care too much about the exit
> code from the bisection, but if dying from diff-tree can interfere
> with such a clean-up, that would bother me a lot more, and at that
> point, given especially that this is not a performance sensitive
> thing at all (it is not even invoked log(n) times---just once at the
> end), moving to external process may make it a lot simpler and
> cleaner.
Thanks, I had a vague feeling along these lines, but you nicely put it
into words. As far as I can tell, no, we're not missing any important
cleanup in that process; it looks like the only call to show_diff_tree()
then calls exit(10) immediately after.
However, that does change our exit code, which git-bisect.sh then
propagates instead of writing the entry into the BISECT_LOG.
I'm still not convinced this is really worth caring about, as it implies
a corrupt repo. But if we did want to fix it, then I think the external
diff-tree would still be the right thing (since it's hard for
git-bisect.sh to tell the different between this death and another one).
-Peff
next prev parent reply other threads:[~2019-02-23 13:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-21 10:47 git bisect - good vs bad output is different Bartosz Baranowski
2019-02-21 21:39 ` Junio C Hamano
2019-02-22 6:19 ` [PATCH 0/3] prettier bisect output Jeff King
2019-02-22 6:20 ` [PATCH 1/3] bisect: use string arguments to feed internal diff-tree Jeff King
2019-02-22 6:21 ` [PATCH 2/3] bisect: fix internal diff-tree config loading Jeff King
2019-03-03 17:59 ` Christian Couder
2019-03-05 4:15 ` Jeff King
2019-02-22 6:23 ` [PATCH 3/3] bisect: make diff-tree output prettier Jeff King
2019-02-22 17:49 ` Junio C Hamano
2019-02-23 13:44 ` Jeff King [this message]
2019-03-03 18:25 ` Christian Couder
2019-02-22 17:39 ` [PATCH 0/3] prettier bisect output Junio C Hamano
2019-03-03 18:33 ` Christian Couder
2019-03-05 4:16 ` Jeff King
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190223134452.GE22403@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=bbaranow@redhat.com \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).