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

Re: 2.29.0.rc0.windows.1: Duplicate commit id error message when fetching

From
Jeff King <peff@peff.net>
Date
Oct 7, 2020, 21:06 UTC
Message-ID
<20201007210609.GA1984296@coredump.intra.peff.net>
In-Reply-To
<55f8f00c-a61c-67d4-889e-a9501c596c39@virtuell-zuhause.de>
On Wed, Oct 07, 2020 at 10:28:36PM +0200, Thomas Braun wrote:
Show 9 quoted lines
> $ git --version
> git version 2.29.0.rc0.windows.1
> 
> Since I upgraded to that version (thanks to dscho for providing these so
> early) I'm seeing occasionally
> 
> $ git fetch origin +refs/head/abcd:refs/remotes/origin/abcd
> fatal: unexpected duplicate commit id
> 31a13139875bc5f49ddcbd42b4b4d3dc18c16576
That message comes from the commit-graph code:
  $ git grep unexpected.duplicate.commit.id '*.c'
  commit-graph.c:                 die(_("unexpected duplicate commit id %s"),

So presumably it's related to the fetch.writeCommitGraph feature, though I thought it was not on by default (for a while it was tied to feature.experimental, but I think even that is not true in 2.29). Do you have that option set?

The message is in sort_and_scan_merged_commits(), which is trying to join multiple incremental commit-graph files together. Presumably you have two such files with the same commit appearing in both. I think we try to avoid that (by omitting commits from new incrementals that already appear in another one), but I wonder if there is a race or other condition that can cause it. In which case this code ought to be more lenient, and just quietly ignore the duplicate.

Is it possible to share the contents of your .git directory? If not, can you look in .git/objects/info/ and see if there are multiple commit-graph files (and if so, possibly share those; they don't contain any identifying info).

-Peff
Previous: Thomas BraunNext: Thomas Braun
Message 2 of 14 in “2.29.0.rc0.windows.1: Duplicate commit id error message when fetching”
  1. Thomas BraunOct 7, 2020
  2. Jeff KingOct 7, 2020
  3. Thomas BraunOct 8, 2020
  4. Jeff KingOct 8, 2020
  5. Derrick StoleeOct 8, 2020
  6. Derrick StoleeOct 8, 2020
  7. Thomas BraunOct 9, 2020
  8. Derrick StoleeOct 9, 2020
  9. Thomas BraunOct 9, 2020
  10. Derrick StoleeOct 9, 2020
  11. Jeff KingOct 9, 2020
  12. Taylor BlauOct 9, 2020
  13. Derrick StoleeOct 9, 2020
  14. Taylor BlauOct 9, 2020

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.