{"thread":{"id":"65957","subject":"git fetch automatic tag fetching - confusing when on or off","startedAt":"2026-07-09T07:33:48Z","lastAt":"2026-07-09T07:33:48Z","messageCount":1,"participants":["Ondra Medek"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"547563","messageId":"CAJsoDaFJLk5d7awSR1t6C7+F6d_1gv+qQCQHKzb_YA6dZzXfQA@mail.gmail.com","threadId":"65957","inReplyTo":null,"subject":"git fetch automatic tag fetching - confusing when on or off","fromName":"Ondra Medek","fromEmail":"xmedeko@gmail.com","sentAt":"2026-07-09T07:33:33Z","receivedAt":"2026-07-09T07:33:48Z","isPatch":false,"body":"Hi,\nIn git fetch documentation https://git-scm.com/docs/git-fetch is:\n\n> By default, any tag that points into the histories being fetched is also fetched; the effect is to fetch tags that point at branches that you are interested in. This default behavior can be changed by using the --tags or --no-tags options or by configuring remote.<name>.tagOpt.\n\nHowever, sometimes this automatic tag fetching works and sometimes not\nand it's mentioned in docs when and why. See the following examples.\n(I have no any git config setting regarding tag fetching set).\n\nAll these commands DO NOT automatically fetch tags:\n\ngit fetch origin master\ngit fetch origin master:\ngit fetch origin refs/heads/master\ngit fetch origin refs/heads/master:\n\nWhile specifying :dst part of refspec DOES automatic tags fetching:\n\ngit fetch origin refs/heads/master:refs/remotes/origin/master\n\nWhat is even more confusing (or maybe a bug), adding a nonexistent\nrefs prefix (i.e. with no real refs in local or remote repository)\nDOES tags fetching even for \"master\" branch:\n\ngit fetch origin master refs/none/*:refs/none/*\n\nSo, it seems to me any refspec with :dst part triggers automatic tag\nfetching for all refspecs? Please, document (or fix) this behaviour.\n\nNote: I've prepared tests with\ngit tag tagTest master\ngit push --tags origin\nAnd deleted local tag before each test\ngit tag -d tagTest\n\nThanks and best regards\nOndřej Medek\n"}]}