git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG] git fetch fetches tags matching negative refspec
@ 2022-10-12  8:29 Erik Cervin Edin
  2022-10-12  9:11 ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 7+ messages in thread
From: Erik Cervin Edin @ 2022-10-12  8:29 UTC (permalink / raw)
  To: Git Mailing List

Thank you for filling out a Git bug report!
Please answer the following questions to help us understand your issue.

What did you do before the bug happened? (Steps to reproduce your issue)

Delete all v2.9.* tags
  git tag | grep ^v2.9.* | xargs git tag -d

Change standard the standard fetch configuration
[remote "origin"]
    url = git@github.com:git/git.git
    fetch = +refs/heads/*:refs/remotes/origin/*

By adding a negative respec for tags matching v2.9.*
[remote "origin"]
    url = git@github.com:git/git.git
    fetch = +refs/heads/*:refs/remotes/origin/*
    fetch = ^refs/tags/v2.9.*

run
  git fetch

What did you expect to happen? (Expected behavior)

To exclude tags matchings v2.9*, just like when running git fetch --tags

What happened instead? (Actual behavior)

Without specifying git fetch --tags, tags matching the negative
refspec are still fetched

What's different between what you expected and what actually happened?

The negative refspec appears to be ignored or overruled when running
git fetch without the --tags flag

Anything else you want to add:
I love git, thank you! ♥

Please review the rest of the bug report below.
You can delete any lines you don't wish to share.


[System Info]
git version:
git version 2.38.0.windows.1
cpu: x86_64
built from commit: 0355083fbe5582f6d3f819afc130ed2f2375e0bd
sizeof-long: 4
sizeof-size_t: 8
shell-path: /bin/sh
feature: fsmonitor--daemon
uname: Windows 10.0 19044
compiler info: gnuc: 12.2
libc info: no libc information available
$SHELL (typically, interactive shell): C:\Users\erik\Git\usr\bin\bash.exe


[Enabled Hooks]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-10-18 12:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2022-10-13  8:15       ` Erik Cervin Edin
2022-10-13 15:30       ` Junio C Hamano
2022-10-18 12:40         ` Erik Cervin Edin

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).