Thread (6 messages) flat view 6 messages, 3 authors, 2016-06-15

Re: [PATCH] bisect: print abbrev sha1 for first bad commit

From: Jeff King <hidden>
Date: 2016-06-15 23:04:42

On Fri, May 08, 2015 at 10:03:41PM -0400, Trevor Saunders wrote:
On Fri, May 08, 2015 at 05:29:42PM -0700, Stefan Beller wrote:
quoted
On Fri, May 8, 2015 at 4:46 PM, Trevor Saunders [off-list ref] wrote:
quoted
its rather silly especially considering the next line contains the
full hash again.
Maybe we can omit it altogether then?
SO we'd print something like

the first bad commit is
Commit abcdefabcdefabcdefabcdefabcdefabcdefabcd
Author foo@ba.com

blah blah blah

? That seems reasonable to me.  If we're going that far does it also
make sense to drop printingthe lines about which trees have changed and
just print the commit message / author / hash?
Yeah, I have always found bisect's output somewhat silly. It prints the
"--raw" diff output, which is not incredibly useful. And then to top it
off, it does not feed the "--recursive" switch to the diff, so you don't
even get to see the real list of changed files.

I suspect the most minimal we could go is:

  git log --format='The first bad commit is %h %s' $bad

and then let the user inspect further from there using the hash. But I
think it would also be reasonable to just do a straight "git log -1
$bad" with no with no diff.

(Actually, it looks like all this is generated in bisect.c:show_diff_tree,
so it would have to be written in C; but it should be pretty easy to
tweak the display options).

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help