git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-2.51.0: Fetching tags does not work

From
DBDavid Bohman <debohman@gmail.com>
Date
Nov 3, 2025, 01:41 UTC
Message-ID
<CAB9xhmPAe1z8wqWnbpPuPE=y=nuKMsGG3_bk+DkGmXDfshaaiA@mail.gmail.com>
In-Reply-To
<CAB9xhmPw6P1J2a3P+btUT1chhNQrhcx3pSkq+vqZbhFhCqcX9w@mail.gmail.com>

I am able to reproduce this locally using a bare main repository, a local bare clone of it, and a non bare clone of the main to insert revisions and tags into the main. If you move an existing tag in the main using push -f and then try to fetch --tags into the bare clone, it fails to insert a new tag into the bare clone:

% ( cd test2.git; git fetch --tags )
From /private/tmp/test
 * branch            HEAD       -> FETCH_HEAD
 ! [rejected]        stable     -> stable  (would clobber existing tag)
 * [new tag]         v5         -> v5
% ( cd test2.git; git fetch --tags )
From /private/tmp/test
 * branch            HEAD       -> FETCH_HEAD
 ! [rejected]        stable     -> stable  (would clobber existing tag)
 * [new tag]         v5         -> v5
% print $?
1
% ( cd test2.git; git fetch --tags )
From /private/tmp/test
 * branch            HEAD       -> FETCH_HEAD
 ! [rejected]        stable     -> stable  (would clobber existing tag)
 * [new tag]         v5         -> v5
% ( cd test2.git; git tag ) | grep v5
%
On Sun, Nov 2, 2025 at 4:47 PM David Bohman <debohman@gmail.com> wrote:
Show 28 quoted lines
>
> I am sorry to have to bring this up again, but I am still occasionally
> seeing this problem with git 2.51.2.
>
> What is happening is that I am cloning a repository as bare, and then
> later I try to fetch the new content including the tags:
>
> % ( cd bind9.git; git fetch --tags )
> From https://gitlab.isc.org/isc-projects/bind9
>  * branch                  HEAD       -> FETCH_HEAD
>  ! [rejected]              stable     -> stable  (would clobber existing tag)
>  * [new tag]               v9.18.41   -> v9.18.41
>  * [new tag]               v9.20.15   -> v9.20.15
>  * [new tag]               v9.21.14   -> v9.21.14
> % ( cd bind9.git; git fetch --tags )
> From https://gitlab.isc.org/isc-projects/bind9
>  * branch                  HEAD       -> FETCH_HEAD
>  ! [rejected]              stable     -> stable  (would clobber existing tag)
>  * [new tag]               v9.18.41   -> v9.18.41
>  * [new tag]               v9.20.15   -> v9.20.15
>  * [new tag]               v9.21.14   -> v9.21.14
> % print $?
> 1
> % ( cd bind9.git; git tag ) | grep v9.20.15
> %
>
> As you can see, it is getting an error for one of the tags, but it is
> also failing to record the other new tags into the repository.
Previous: David BohmanNext: Karthik Nayak
Message 8 of 9 in “git-2.51.0: Fetching tags does not work”
  1. David BohmanSep 6, 2025
  2. Junio C HamanoSep 6, 2025
  3. David BohmanNov 3, 2025
  4. rsbecker@nexbridge.comNov 3, 2025
  5. David BohmanNov 3, 2025
  6. Chris TorekNov 3, 2025
  7. David BohmanNov 3, 2025
  8. David BohmanNov 3, 2025
  9. Karthik NayakNov 3, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.