Ambiguous sha-1 during a rebase
- From
Mike Hommey <mh@glandium.org>
- Date
- Apr 13, 2016, 22:29 UTC
- Message-ID
- <20160413222919.GA10474@glandium.org>
Hi,
Something interesting happened to me. I was in the middle of an interactive rebase, and after a --continue, I got:
error: short SHA1 e34ff55 is ambiguous. fatal: Needed a single revision Invalid commit name: e34ff55
One thing that happened, is that, while running that interactive rebase, I /also/ did a `git remote update` from an other shell, which, I guess, happened to have imported another object that made e34ff55 ambiguous.
Should git-rebase use full sha-1s under the hood to avoid these type of races?
Relatedly, having looked up the ambiguity, it turns out the other object that fits the same short sha1 is a tree... maybe git should be able to disambiguate in that case, since it was looking for a commit, and there's only one commit with that short sha1?
Mike