git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Ambiguous reference weirdness
@ 2012-02-22  1:46 Phil Hord
  2012-02-22  7:00 ` Jeff King
  0 siblings, 1 reply; 4+ messages in thread
From: Phil Hord @ 2012-02-22  1:46 UTC (permalink / raw)
  To: git, Ramkumar Ramachandra, Junio C Hamano, Jonathan Nieder

I accidentally ran into this today:
    $ git cherry-pick 1147
    fatal: BUG: expected exactly one commit from walk

git log shows no output:
    $ git log 1147

Neither of these are very helpful or reassuring.  I tried a few things
but I haven't looked the code yet.  I found lots of inconsistencies
along the way.

$ git clone https://github.com/git/git
$ cd git

$git log 114
fatal: ambiguous argument '114': unknown revision or path not in the
working tree.
Use '--' to separate paths from revisions

$ git checkout 114
error: pathspec '114' did not match any file(s) known to git.
$ git merge 114
fatal: '114' does not point to a commit
$ git cherry-pick 114
fatal: ambiguous argument '114': unknown revision or path not in the
working tree.
Use '--' to separate paths from revisions

$ git checkout 1147
fatal: reference is not a tree: 1147
$ git merge 1147
error: 1147: expected commit type, but the object dereferences to blob type
fatal: '1147' does not point to a commit
$ git cherry-pick 1147
fatal: BUG: expected exactly one commit from walk
$ git log 1147

$ git checkout 1146
error: short SHA1 1146 is ambiguous.
error: pathspec '1146' did not match any file(s) known to git.
$ git merge 1146
error: short SHA1 1146 is ambiguous.
fatal: '1146' does not point to a commit
$ git cherry-pick 1146
error: short SHA1 1146 is ambiguous.
error: short SHA1 1146 is ambiguous.
fatal: ambiguous argument '1146': unknown revision or path not in the
working tree.
Use '--' to separate paths from revisions
$ git log 1146
error: short SHA1 1146 is ambiguous.
error: short SHA1 1146 is ambiguous.
fatal: ambiguous argument '1146': unknown revision or path not in the
working tree.
Use '--' to separate paths from revisions

I can understand some of the inconsistent error reporting (checkout
may expect filenames, but cherry-pick and merge do not).  But this
seems too varied to me.

And the first two look like bugs.

Any comments or suggestions?

Phil

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

end of thread, other threads:[~2012-02-22 20:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-22  1:46 Ambiguous reference weirdness Phil Hord
2012-02-22  7:00 ` Jeff King
2012-02-22 14:48   ` Phil Hord
2012-02-22 20:38     ` Jeff King

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