[BUG] git fetch fetches tags matching negative refspec

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx:git/git.git
    fetch = +refs/heads/*:refs/remotes/origin/*

By adding a negative respec for tags matching v2.9.*
[remote "origin"]
    url = git@xxxxxxxxxx: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]



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux