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

[BUG?] Fetching a single tag to a local tag requires `--no-tags`

From
Philippe Blain <levraiphilippeblain@gmail.com>
Date
Jul 15, 2020, 02:17 UTC
Message-ID
<12F0A2A4-CC71-4452-B8B8-F540339F8519@gmail.com>
Hello everyone,

If I want to fetch a single tag from a remote repository to a local tag, it seems I have to use `--no-tags`, or else all tags on the remote are fetched:

git remote add ggg https://github.com/gitgitgadget/git # this command fetches all tags on Gitgitgadget git fetch ggg tag pr-590/phil-blain/doc-log-multiple-ranges-v2 # this command fetches only the tag listed on the command line git fetch ggg tag pr-590/phil-blain/doc-log-multiple-ranges-v2 --no-tags

Am I reading the documentation correctly ?

tag <tag> syntax [1]: "tag <tag> means the same as refs/tags/<tag>:refs/tags/<tag>; it requests fetching everything up to the given tag."

--no-tags [2] : "By default, tags that point at objects that are downloaded from the remote repository are fetched and stored locally. This option disables this automatic tag following."

Clearly the commits at the tips of the multiple iterations of all series ever submitted using Gitgitgadget should not be downloaded when I'm just fetching a version of my own submission, so I don't understand why these objects are fetched and why those local tags are created...

[1] https://git-scm.com/docs/git-fetch#Documentation/git-fetch.txt-ltrefspecgt [2] https://git-scm.com/docs/git-fetch#Documentation/git-fetch.txt---no-tags

Cheers,
Philippe.
Next: Jeff King
Message 1 of 3 in “[BUG?] Fetching a single tag to a local tag requires `--no-tags`”
  1. Philippe BlainJul 15, 2020
  2. Jeff KingJul 15, 2020
  3. Philippe BlainJul 15, 2020

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.