From: "Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail•com>
To: "Josh Soref" <gitgitgadget@gmail•com>, git@vger•kernel.org
Cc: "Patrick Steinhardt" <ps@pks•im>,
"Samo Pogačnik" <samo_pogacnik@t-2•net>
Subject: Re: [PATCH v3 2/2] shallow: handling fetch relative-deepen
Date: Thu, 15 Jan 2026 16:50:17 +0100 [thread overview]
Message-ID: <11b951ab-b624-4ab8-b7b1-fe41a40c9d0e@app.fastmail.com> (raw)
In-Reply-To: <e79ab6b7406e3472ed8816131d4e33f7d8e696f2.1768022018.git.gitgitgadget@gmail.com>
On Sat, Jan 10, 2026, at 06:13, Samo Pogačnik via GitGitGadget wrote:
> When a shallowed repository gets deepened beyond the beginning of a
> merged branch, we may end up with some shallows that are hidden behind
> the reachable shallow commits. Added test 'fetching deepen beyond
> merged branch' exposes that behaviour.
>
> An example showing the problem based on added test:
>[snip]
> ---
> Note that second shallow commit 61ba98be443fd51c542eb66585a1f6d7e15fcdae
> is not reachable.
>
> On the other hand, it seems that equivalent absolute depth driven
> fetches result in all the correct shallows. That led to this proposal,
> which unifies absolute and relative deepening in a way that the same
> get_shallow_commits() call is used in both cases. The difference is
> only that depth is adapted for relative deepening by measuring
> equivalent depth of current local shallow commits in the current remote
> repo. Thus a new function get_shallows_depth() has been added and the
> function get_reachable_list() became redundant / removed.
>
> Same example showing the corrected second step:
>[snip]
>
> The get_shallows_depth() function also shares the logic of the
> get_shallow_commits() function, but it focuses on counting depth of
> each existing shallow commit. The minimum result is stored as
> 'data->deepen_relative', which is set not to be zero for relative
> deepening anyway. That way we can allways summ 'data->deepen_relative'
s/allways summ/always sum/ ?
> and 'depth' values, because 'data->deepen_relative' is always 0 in
> absolute deepening.
>
> Signed-off-by: Samo Pogačnik <samo_pogacnik@t-2•net>
> ---
>[snip]
next prev parent reply other threads:[~2026-01-15 15:50 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-09 18:11 [PATCH 0/2] shallow: handling fetch relative-deepen Samo Pogačnik via GitGitGadget
2025-12-09 18:11 ` [PATCH 1/2] shallow: free local object_array allocations Samo Pogačnik via GitGitGadget
2026-01-06 7:44 ` Patrick Steinhardt
2026-01-09 16:21 ` Samo Pogačnik
2026-01-09 16:33 ` Patrick Steinhardt
2025-12-09 18:11 ` [PATCH 2/2] shallow: handling fetch relative-deepen Samo Pogačnik via GitGitGadget
2026-01-06 7:44 ` Patrick Steinhardt
2026-01-09 16:48 ` Samo Pogačnik
2026-01-09 22:23 ` [PATCH v2 0/2] " Samo Pogačnik via GitGitGadget
2026-01-09 22:23 ` [PATCH v2 1/2] shallow: free local object_array allocations Samo Pogačnik via GitGitGadget
2026-01-09 22:23 ` [PATCH v2 2/2] shallow: handling fetch relative-deepen Samo Pogačnik via GitGitGadget
2026-01-10 4:17 ` Junio C Hamano
2026-01-10 5:13 ` [PATCH v3 0/2] " Samo Pogačnik via GitGitGadget
2026-01-10 5:13 ` [PATCH v3 1/2] shallow: free local object_array allocations Samo Pogačnik via GitGitGadget
2026-01-10 5:13 ` [PATCH v3 2/2] shallow: handling fetch relative-deepen Samo Pogačnik via GitGitGadget
2026-01-15 15:50 ` Kristoffer Haugsbakk [this message]
2026-01-16 22:30 ` [PATCH v4 0/2] " Samo Pogačnik via GitGitGadget
2026-01-16 22:31 ` [PATCH v4 1/2] shallow: free local object_array allocations Samo Pogačnik via GitGitGadget
2026-01-16 22:31 ` [PATCH v4 2/2] shallow: handling fetch relative-deepen Samo Pogačnik via GitGitGadget
2026-02-11 13:38 ` Patrick Steinhardt
2026-02-13 20:48 ` Samo Pogačnik
2026-02-14 9:40 ` Samo Pogačnik
2026-02-15 11:19 ` Samo Pogačnik
2026-02-15 20:11 ` [PATCH v5 0/2] " Samo Pogačnik via GitGitGadget
2026-02-15 20:11 ` [PATCH v5 1/2] shallow: free local object_array allocations Samo Pogačnik via GitGitGadget
2026-02-15 20:11 ` [PATCH v5 2/2] shallow: handling fetch relative-deepen Samo Pogačnik via GitGitGadget
2026-02-20 22:34 ` [PATCH v5 0/2] " Junio C Hamano
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=11b951ab-b624-4ab8-b7b1-fe41a40c9d0e@app.fastmail.com \
--to=kristofferhaugsbakk@fastmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=gitgitgadget@gmail$(echo .)com \
--cc=ps@pks$(echo .)im \
--cc=samo_pogacnik@t-2$(echo .)net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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