From: Jeff King <peff@peff.net>
To: Daniel Mach <daniel.mach@suse.com>
Cc: git@vger.kernel.org
Subject: Re: git clone fails when using --dissociate together with a reference repository that contains a commit-graph
Date: Tue, 12 May 2026 14:38:35 -0400 [thread overview]
Message-ID: <20260512183835.GB70851@coredump.intra.peff.net> (raw)
In-Reply-To: <6ae85515-9373-4c9e-90d2-5e4176590c5b@suse.com>
On Tue, May 12, 2026 at 09:35:49AM +0200, Daniel Mach wrote:
> 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
prev parent reply other threads:[~2026-05-12 18:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 7:35 git clone fails when using --dissociate together with a reference repository that contains a commit-graph Daniel Mach
2026-05-12 18:38 ` Jeff King [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260512183835.GB70851@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=daniel.mach@suse.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox