Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Samo Pogačnik" <samo_pogacnik@t-2.net>
Cc: git@vger.kernel.org,  l.s.r@web.de,  owen@owenstephens.co.uk
Subject: Re: [PATCH 1/1] shallow: fix relative deepen on non-shallow repositories
Date: Mon, 11 May 2026 09:09:53 +0900	[thread overview]
Message-ID: <xmqqzf26x0vi.fsf@gitster.g> (raw)
In-Reply-To: <20260506215647.3011769-1-samo_pogacnik@t-2.net> ("Samo Pogačnik"'s message of "Wed, 6 May 2026 23:56:45 +0200")

Samo Pogačnik <samo_pogacnik@t-2.net> writes:

> The previous patch "shallow: handling fetch relative-deepen"

Whose "previous patch" are we talking about in [PATCH 1/1]?

Please refer to the commit with "git show -s --format=reference", if
you are talking about a public commit etched in the history.

> introduced a bug where using --deepen=<n> on a non-shallow
> repository incorrectly treated the value as an absolute depth,
> resulting in a shallow fetch and truncated history.

That's unfortunate.

We obviously should not truncate when asked to "deepen" (i.e., the
user asked to get more history, not reset the number of commits we
have to a specific depth), and making the operation in this
situation a no-op may be a good first step, but should we just do so
silently, instead of giving a warning/diagnosis?

> This patch prevents any modification when a relative deepen is
> requested on a non-shallow repository.
>
> A test is added to ensure that history is not changed when
> --deepen is used on a non-shallow repository.
>
> Reported-by: Owen Stephens <owen@owenstephens.co.uk>
> Signed-off-by: Samo Pogačnik <samo_pogacnik@t-2.net>

  reply	other threads:[~2026-05-11  0:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-29 11:27 [Bug] fetch --deepen truncates history in v2.54.0 Owen Stephens
2026-04-29 13:14 ` Owen Stephens
2026-04-29 13:16 ` D. Ben Knoble
2026-04-30  9:10   ` Mikael Magnusson
2026-05-02  9:22 ` René Scharfe
2026-05-02 20:26   ` René Scharfe
2026-05-05 19:27     ` Samo Pogačnik
2026-05-05 20:34       ` René Scharfe
2026-05-05 21:26         ` Samo Pogačnik
2026-05-06 21:56         ` [PATCH 1/1] shallow: fix relative deepen on non-shallow repositories Samo Pogačnik
2026-05-11  0:09           ` Junio C Hamano [this message]
2026-05-11  7:45             ` René Scharfe
2026-05-11  8:30               ` Junio C Hamano
2026-05-11 19:20                 ` [PATCH v2] " Samo Pogačnik

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=xmqqzf26x0vi.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=l.s.r@web.de \
    --cc=owen@owenstephens.co.uk \
    --cc=samo_pogacnik@t-2.net \
    /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