Ambiguous reference weirdness
- From
Phil Hord <phil.hord@gmail.com>
- Date
- Feb 22, 2012, 01:46 UTC
- Message-ID
- <CABURp0oAw7cvU7cwCZOtvqZ_oa0hDPsE_0Lm3kR1ctdNuxU3hg@mail.gmail.com>
I accidentally ran into this today:
$ git cherry-pick 1147
fatal: BUG: expected exactly one commit from walkgit log shows no output:
$ git log 1147Neither 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