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

Re: git clone fails when using --dissociate together with a reference repository that contains a commit-graph

From
Jeff King <peff@peff.net>
Date
May 12, 2026, 18:38 UTC
Message-ID
<20260512183835.GB70851@coredump.intra.peff.net>
In-Reply-To
<6ae85515-9373-4c9e-90d2-5e4176590c5b@suse.com>
On Tue, May 12, 2026 at 09:35:49AM +0200, Daniel Mach wrote:
Show 10 quoted lines
> I've stumbled upon a bug that the following command failed:
> 
> $ git clone <url> <dir> --reference <old-dir> --dissociate
> fatal: unable to parse commit <SHA>
> warning: Clone succeeded, but checkout failed.
> You can inspect what was checked out with 'git status'
> and retry with 'git restore --source=HEAD :/'
> 
> Omitting --dissociate fixed the error, but it wasn't clear to me what might
> be the root cause.
I think this is the same bug discussed here:
  https://lore.kernel.org/git/20260504095110.GA599780@coredump.intra.peff.net/

I haven't worked up a more polished patch yet because I was trying to decide between the approach given there (to lazily fall back to manual parsing) versus filling in all of the dependent tree fields when closing the commit-graph. Which one is cheaper depends on the access patterns (how many commits will actually be looked at post-close, versus how many were ever loaded).

-Peff
Previous: Daniel Mach
Message 2 of 2 in “git clone fails when using --dissociate together with a reference repository that contains a commit-graph”
  1. Daniel MachMay 12, 2026
  2. Jeff KingMay 12, 2026

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.