From: Igor Wiedler <iwiedler@gitlab.com>
To: git@vger.kernel.org
Cc: ps@pks.im, gitster@pobox.com, jltobler@gmail.com,
Igor Wiedler <iwiedler@gitlab.com>
Subject: [PATCH v2 0/2] connected: fix the connectivity check with alternates in deepening fetches
Date: Wed, 14 Oct 2026 20:11:32 +0200 [thread overview]
Message-ID: <20261014181134.56220-1-iwiedler@gitlab.com> (raw)
In-Reply-To: <20261014103507.35317-1-iwiedler@gitlab.com>
In a deepening fetch the connectivity check runs rev-list with
"--alternate-refs" as a positive revision, so it walks the alternate's
whole history. With a 7M-object alternate the check takes 227s after
a fetch that received an empty pack.
Changes since v1:
* The connectivity check negates "--alternate-refs" in both cases,
as Junio suggested, instead of dropping it for deepening fetches.
The alternate's refs are a boundary like our own refs. Compared to
Junio's diff, "--alternate-refs" moved up next to "--all" so that
the comment above "--not" covers all of the boundary arguments.
* New second patch: odb_for_each_alternate_ref() ignores the refs of
shallow and grafted alternates, so that neither the connectivity
check, nor fetch-pack's "have"s, nor receive-pack's ".have"s treat
history that the alternate does not have as present. Partial
clones are not detected, see the commit message.
v1: https://lore.kernel.org/git/20261014103507.35317-1-iwiedler@gitlab.com/
Igor Wiedler (2):
connected: negate alternate refs in deepening fetches too
odb: ignore refs of shallow and grafted alternates
Documentation/rev-list-options.adoc | 7 ++++---
connected.c | 6 ++++--
odb.c | 11 +++++++++++
t/t5618-alternate-refs.sh | 25 +++++++++++++++++++++++++
4 files changed, 44 insertions(+), 5 deletions(-)
base-commit: 6de20f6092dcf9bdb1c8efe03db4b70c82b423dd
--
2.56.0
next prev parent reply other threads:[~2026-10-14 18:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 10:35 [PATCH] connected: do not walk alternate refs in deepening fetches Igor Wiedler
2026-10-14 12:25 ` Patrick Steinhardt
2026-10-14 16:55 ` Junio C Hamano
2026-10-14 17:02 ` Justin Tobler
2026-10-14 18:11 ` Igor Wiedler [this message]
2026-10-14 19:23 ` [PATCH v2 0/2] connected: fix the connectivity check with alternates " Junio C Hamano
2026-10-14 18:11 ` [PATCH v2 1/2] connected: negate alternate refs in deepening fetches too Igor Wiedler
2026-10-14 18:11 ` [PATCH v2 2/2] odb: ignore refs of shallow and grafted alternates Igor Wiedler
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=20261014181134.56220-1-iwiedler@gitlab.com \
--to=iwiedler@gitlab.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jltobler@gmail.com \
--cc=ps@pks.im \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.