git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* bisect: "Needed a single revision" message is confusing
@ 2012-11-02 13:23 Daniel Bonniot
  2012-11-02 14:10 ` Michael J Gruber
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Bonniot @ 2012-11-02 13:23 UTC (permalink / raw)
  To: git

Hi,

Suppose I'm doing a git bisect, say:

$ git bisect good 8c7a786b6c8eae8eac91083cdc9a6e337bc133b0

That works fine. The sha1 could also be a substring, as long as it's
unambiguous, e.g.:

$ git bisect good 8c7a786b6c

Now if it's ambiguous, I get an error message:

$ git bisect good 8
fatal: Needed a single revision
Bad rev input: 8

All fine and good. But what if I somehow input a non-existing sha1 (in
my case see [1]), e,g:

$ git bisect good 8c7a786b6c8eae8eac91083cdc9a6e337bc133b1
fatal: Needed a single revision
Bad rev input: 8c7a786b6c8eae8eac91083cdc9a6e337bc133b1

I understand that technically both "no revision" and "multiple
revisions" qualify as "not a single revision", but they correspond to
quite different situations. I think it would be more helpful to get
different error messages, something like:

Bad rev input: 8 refers to multiple revisions
Bad rev input: 8c7a786b6c8eae8eac91083cdc9a6e337bc133b1 does not refer
to a valid revision

(and avoid outputing the "fatal: Needed a single revision" message).

Is this a good idea? Anybody can think of better error messages?

I'm not familiar with the code base at all, but I could give a try at
implementing it, unless it's trivial enough that someone does it
earlier. After a quick look, it looks like either git-bisect itself or
rev-parse would need to be touched, any pointers and hints welcome.

Cheers,

Daniel

[1] if you want to know, I got a sha1 from one repository and used it
in another, which probably should work, except that when using git-svn
they don't. And the "single revision" error message lead me on a
tangent.

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

end of thread, other threads:[~2012-11-02 14:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-02 13:23 bisect: "Needed a single revision" message is confusing Daniel Bonniot
2012-11-02 14:10 ` Michael J Gruber

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