git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "D. Ben Knoble" <ben.knoble@gmail.com>
To: Philipp Hahn <phahn-oss@avm.de>
Cc: newren@gmail.com, bolide2005@163.com, git@vger.kernel.org
Subject: Re: --shallow-exclude=ref -> "ambiguous deepen-not" error
Date: Tue, 16 Sep 2025 13:03:41 -0400	[thread overview]
Message-ID: <CALnO6CAbUNgp6n4kYg1ATCC1mHa7Z2m3d7FZwaYrgtkMLWR3-w@mail.gmail.com> (raw)
In-Reply-To: <20250916145032.969133-1-phahn-oss@avm.de>

On Tue, Sep 16, 2025 at 10:58 AM Philipp Hahn <phahn-oss@avm.de> wrote:
>
> Hello Elijah,
>
> On Mon, 24 Feb 2025 at 07:27:55 -0800 Elijah Newren <newren@gmail.com> wrote:
> > On Thu, Feb 20, 2025 at 12:27 AM bolide2005@163.com <bolide2005@163.com> wrote:
> > > Case 2: git clone --shallow-exclude=<rev> <repo-url>
> >
> > The documentation was fixed for case 2 in 00e10e07510 ("doc: correct
> > misleading descriptions for --shallow-exclude", 2024-11-04) to point
> > out that this usage is flawed.
>
> I have searched the archive and git repository, but found no explanation, why
> that usage - shallow-exclude by REV - is considered "flawed": I understand,
> that the current implementation does not support this, but is there any
> technical reason why that is not possible or undesirable?
>
>                      A---B---C topic
>                     /
>                D---E---F---G master
>
> I have a use-case for this, where we use GitLab to run some linters on our
> merge requests (MRs): They examine the commits since the fork-point "E", for
> which they need access to the commits + trees + blobs. Some MRs are larger,
> some smaller, so there is no fixed maximum depth I can give to `--depth X` and
> be sure to have gotten all commits.
> Same for `--shallow-since=` as some are dormant for a year and many other MRs
> by-pass them.

I might have misunderstood, but aren't the commits you're interested
in here the ones named by

    git rev-list master..topic

?

I see a mention of git-clone in the quoted reply, so perhaps you're
trying to avoid cloning too much history. I wonder if a blobless clone
would suffice, which you can then add to once you have the list of
commits produced above? That would fetch more commits than necessary,
but should still be significantly cheaper.

-- 
D. Ben Knoble

  reply	other threads:[~2025-09-16 17:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-20  8:26 Bug or just a mistake : --shallow-exclude parameter behavior anomalies in Git 2.45.2: "no commits selected" and "ambiguous deepen-not" errors bolide2005
2025-02-24 15:27 ` Elijah Newren
2025-09-16 14:50   ` --shallow-exclude=ref -> "ambiguous deepen-not" error Philipp Hahn
2025-09-16 17:03     ` D. Ben Knoble [this message]
2025-09-16 17:57       ` Philipp Hahn
2025-09-16 20:34         ` Ben Knoble
2025-09-17  2:54     ` Elijah Newren

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=CALnO6CAbUNgp6n4kYg1ATCC1mHa7Z2m3d7FZwaYrgtkMLWR3-w@mail.gmail.com \
    --to=ben.knoble@gmail.com \
    --cc=bolide2005@163.com \
    --cc=git@vger.kernel.org \
    --cc=newren@gmail.com \
    --cc=phahn-oss@avm.de \
    /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;
as well as URLs for NNTP newsgroup(s).