git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Next: Junio C Hamano
Message 1 of 8 in “Ambiguous sha-1 during a rebase”
  1. Mike HommeyApr 13, 2016
  2. Junio C HamanoApr 13, 2016
  3. Mike HommeyApr 13, 2016
  4. Matthieu MoyApr 14, 2016
  5. Mike HommeyApr 14, 2016
  6. Matthieu MoyApr 14, 2016
  7. Remi Galan AlfonsoApr 14, 2016
  8. Johannes SchindelinApr 14, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.