From: Derrick Stolee <stolee@gmail.com>
To: Bagas Sanjaya <bagasdotme@gmail.com>, Git Users <git@vger.kernel.org>
Subject: Re: Fetching single tag in shallow clone almost unshallow the clone
Date: Fri, 28 May 2021 07:40:54 -0400 [thread overview]
Message-ID: <d641512e-657f-6dfc-adf4-1b1889439553@gmail.com> (raw)
In-Reply-To: <304633fd-e677-7956-6787-f60f195db9b5@gmail.com>
On 5/28/2021 3:03 AM, Bagas Sanjaya wrote:> But when I fetch a single tag which the commit the tag refers to isn't already on the clone, Git fetched almost the entire history (thus almost unshallow the clone):
>
> $ git fetch origin tag go1.16.1 --no-tags
You should add a --depth here, too. Git doesn't remember that you want
a certain depth, because that doesn't work in perpetuity.
You are hitting the issue I documented in my comparison between partial
and shallow clones [1]: The commit history for go1.16.1 goes "around"
your shallow boundary. See the image immediately above the "Comparing
Clone Options" section.
[1] https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/#user-content-shallow-clones
Thanks,
-Stolee
next prev parent reply other threads:[~2021-05-28 11:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-28 7:03 Fetching single tag in shallow clone almost unshallow the clone Bagas Sanjaya
2021-05-28 11:40 ` Derrick Stolee [this message]
2021-05-28 12:46 ` Bagas Sanjaya
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d641512e-657f-6dfc-adf4-1b1889439553@gmail.com \
--to=stolee@gmail.com \
--cc=bagasdotme@gmail.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).