git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git bisect outputs list of commits in the wrong order
@ 2022-06-10 16:01 Volker Weißmann
  2022-06-10 17:28 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Volker Weißmann @ 2022-06-10 16:01 UTC (permalink / raw)
  To: git

If you use `git bisect` and `git bisect skip`, you might get an output
like this:

There are only 'skip'ped commits left to test.
The first bad commit could be any of:
01f793267a9af328f0f1af2cdb88301a08f007b2
a87784e29411e8b08059fdc79629e64de3002c99
af0df663440796a0580644493c15290405e60ecd
4f34b8cd48e2a814263efb319fe5dbab91215aed
f3d91e38a45f0a2ec5affb884d536c9c4e5bb290
13526e1b0e1b11a2e30e44ccf35fbf92ffb61372
abee97622db5301d593265ff6e2009777b09221e
b63700f09a422f01d954967b84c5e662881352eb
We cannot bisect more!

While the output is correct, I don't like the fact that the commits are
not in chronological order. Is there a reason for this? Chronological
order makes sense and would make it easier to find the first known bad
and the last known good commit.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: git bisect outputs list of commits in the wrong order
  2022-06-10 16:01 git bisect outputs list of commits in the wrong order Volker Weißmann
@ 2022-06-10 17:28 ` Junio C Hamano
  2022-06-10 18:11   ` Jeff King
  0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2022-06-10 17:28 UTC (permalink / raw)
  To: Volker Weißmann, Christian Couder; +Cc: git

Volker Weißmann <volker.weissmann@gmx.de> writes:

> If you use `git bisect` and `git bisect skip`, you might get an output
> like this:
>
> There are only 'skip'ped commits left to test.
> The first bad commit could be any of:
> 01f793267a9af328f0f1af2cdb88301a08f007b2
> a87784e29411e8b08059fdc79629e64de3002c99
> af0df663440796a0580644493c15290405e60ecd
> 4f34b8cd48e2a814263efb319fe5dbab91215aed
> f3d91e38a45f0a2ec5affb884d536c9c4e5bb290
> 13526e1b0e1b11a2e30e44ccf35fbf92ffb61372
> abee97622db5301d593265ff6e2009777b09221e
> b63700f09a422f01d954967b84c5e662881352eb
> We cannot bisect more!
>
> While the output is correct, I don't like the fact that the commits are
> not in chronological order. Is there a reason for this? Chronological
> order makes sense and would make it easier to find the first known bad
> and the last known good commit.

Thanks for a report.

I looked at an "scripted" version in the ancient past and it seems
to have computed by iterating over

	git rev-list bisect/bad --not $good_revs

which would have given these intermediate ones roughly in the
reverse chronological order.  It could be that the behaviour
regressed when the scripted version was rewritten in C, but I dunno.

Christian (as an "area" expert for bisect), do you have any
comments?

Thanks.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: git bisect outputs list of commits in the wrong order
  2022-06-10 17:28 ` Junio C Hamano
@ 2022-06-10 18:11   ` Jeff King
  2022-06-10 18:33     ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff King @ 2022-06-10 18:11 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Volker Weißmann, Christian Couder, git

On Fri, Jun 10, 2022 at 10:28:04AM -0700, Junio C Hamano wrote:

> I looked at an "scripted" version in the ancient past and it seems
> to have computed by iterating over
> 
> 	git rev-list bisect/bad --not $good_revs
> 
> which would have given these intermediate ones roughly in the
> reverse chronological order.  It could be that the behaviour
> regressed when the scripted version was rewritten in C, but I dunno.
> 
> Christian (as an "area" expert for bisect), do you have any
> comments?

It would probably be nice to show them as --oneline, as well. I'd guess
that a human reading the subjects of a handful of commits could quickly
make a good guess as to the actual culprit.

-Peff

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: git bisect outputs list of commits in the wrong order
  2022-06-10 18:11   ` Jeff King
@ 2022-06-10 18:33     ` Junio C Hamano
  0 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2022-06-10 18:33 UTC (permalink / raw)
  To: Jeff King; +Cc: Volker Weißmann, Christian Couder, git

Jeff King <peff@peff.net> writes:

> On Fri, Jun 10, 2022 at 10:28:04AM -0700, Junio C Hamano wrote:
>
>> I looked at an "scripted" version in the ancient past and it seems
>> to have computed by iterating over
>> 
>> 	git rev-list bisect/bad --not $good_revs
>> 
>> which would have given these intermediate ones roughly in the
>> reverse chronological order.  It could be that the behaviour
>> regressed when the scripted version was rewritten in C, but I dunno.
>> 
>> Christian (as an "area" expert for bisect), do you have any
>> comments?
>
> It would probably be nice to show them as --oneline, as well. I'd guess
> that a human reading the subjects of a handful of commits could quickly
> make a good guess as to the actual culprit.

True, too.

The scripted version fed the output from above iteration each to
"show-branch" (as "git log --oneline" was probably not so widely
used or may not have been available back then), to make them human
readable.  We should be able to use pretty.c::pretty_print_commit()
with CMT_FMT_ONELINE to do that more easily these days.

By the way, welcome back ;-)



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-06-10 18:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-10 16:01 git bisect outputs list of commits in the wrong order Volker Weißmann
2022-06-10 17:28 ` Junio C Hamano
2022-06-10 18:11   ` Jeff King
2022-06-10 18:33     ` Junio C Hamano

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).