From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Erik Cervin Edin <erik@cervined.in>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [BUG] git fetch fetches tags matching negative refspec
Date: Thu, 13 Oct 2022 01:09:36 +0200 [thread overview]
Message-ID: <221013.865ygomybw.gmgdl@evledraar.gmail.com> (raw)
In-Reply-To: <CA+JQ7M-y9d=c3GbpAs+Y4qtimtVs9oQ6BU1YL8nmFmF=rZxKag@mail.gmail.com>
On Wed, Oct 12 2022, Erik Cervin Edin wrote:
> On Wed, Oct 12, 2022 at 11:13 AM Ævar Arnfjörð Bjarmason
> <avarab@gmail.com> wrote:
>> I.e. it got stuff you asked for, but also tags pointing at the main
>> history, --no-tags will stop that, at which point you can *also* fetch
>> tags, just with the refspec.
> I tried but
> git fetch --no-tags
> with negative refspec did not fetch any tags.
> git fetch --tags
> does.
Because your refspec doesn't include refs/tags/*:, try e.g.:
git fetch https://github.com/git/git.git 'refs/tags/*:refs/tags/*' --no-tags --dry-run
That's what "--no-tags", i.e. it's per-se (and confusingly) nothing to
do with whether you get tags or not, it's to do with whether we to tag
following.
> I'm going to set
> git config remote.origin.tagopt --tags
> and then that's going to do what I want.
Isn't that going to give you also the tags you don't want?
next prev parent reply other threads:[~2022-10-12 23:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-12 8:29 [BUG] git fetch fetches tags matching negative refspec Erik Cervin Edin
2022-10-12 9:11 ` Ævar Arnfjörð Bjarmason
2022-10-12 15:10 ` Erik Cervin Edin
2022-10-12 23:09 ` Ævar Arnfjörð Bjarmason [this message]
2022-10-13 8:15 ` Erik Cervin Edin
2022-10-13 15:30 ` Junio C Hamano
2022-10-18 12:40 ` Erik Cervin Edin
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=221013.865ygomybw.gmgdl@evledraar.gmail.com \
--to=avarab@gmail.com \
--cc=erik@cervined.in \
--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.
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).