{"thread":{"id":"61467","subject":"git pull --prune --prune-tags yields a usage error In 2.45.0","startedAt":"2024-05-13T23:11:15Z","lastAt":"2024-05-14T06:48:01Z","messageCount":2,"participants":["David Sanderson","Patrick Steinhardt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"494681","messageId":"CAC-6ESEfnjK1ubrzoAfUsegM55e55uKugCPSfxnBC607dmZJRA@mail.gmail.com","threadId":"61467","inReplyTo":null,"subject":"git pull --prune --prune-tags yields a usage error In 2.45.0","fromName":"David Sanderson","fromEmail":"yelliott@gmail.com","sentAt":"2024-05-13T23:11:00Z","receivedAt":"2024-05-13T23:11:15Z","isPatch":false,"sender":{"key":"yelliott@gmail.com","avatar":null},"body":"I noticed that \"git help pull\"  mentioned the flag --prune-tags in\nconjunction with --prune, but actually supplying this flag to\n\"git pull\" results in a usage error.  For instance, the command\n\"git pull --prune --prune-tags\" fails with a usage error.  I would\nhave expected that this would work, since it works with \"git fetch\".\n\nI could use \"git fetch --prune --prune-tags\" as I expected, and\n\"git help fetch\" does describe --prune-tags on its own as well as\nin the help for --prune.\n\nI confirmed that this behavior still exists in git version 2.45.0.\n\nDavid Sanderson\n"},{"id":"494702","messageId":"ZkMJHMtiQWw4qdT2@tanuki","threadId":"61467","inReplyTo":"CAC-6ESEfnjK1ubrzoAfUsegM55e55uKugCPSfxnBC607dmZJRA@mail.gmail.com","subject":"Re: git pull --prune --prune-tags yields a usage error In 2.45.0","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-05-14T06:47:56Z","receivedAt":"2024-05-14T06:48:01Z","isPatch":false,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Mon, May 13, 2024 at 07:11:00PM -0400, David Sanderson wrote:\n> I noticed that \"git help pull\"  mentioned the flag --prune-tags in\n> conjunction with --prune, but actually supplying this flag to\n> \"git pull\" results in a usage error.  For instance, the command\n> \"git pull --prune --prune-tags\" fails with a usage error.  I would\n> have expected that this would work, since it works with \"git fetch\".\n> \n> I could use \"git fetch --prune --prune-tags\" as I expected, and\n> \"git help fetch\" does describe --prune-tags on its own as well as\n> in the help for --prune.\n> \n> I confirmed that this behavior still exists in git version 2.45.0.\n\nIndeed. The fact that we mention `--prune-tags` in git-pull(1) at all is\na bug because that command never even implemented this option. I could\nsee us going one of two ways:\n\n  - Adapt the documentation so that we stop mentioning `--prune-tags`.\n\n  - Implement support for `--prune-tags` in git-pull(1).\n\nI find the value of `--prune-tags` to be rather dubious as it does the\nexact same as `git fetch --prune refs/tags/*:refs/tags/*`. I am heavily\nbiased though as I understand refspecs just fine, which many of our\nusers may not. But the bigger downside of `--prune-tags` in my opinion\nis that it doesn't only prune tags, but also fetches new ones. So the\neffect of the option is somewhat counterintuitive.\n\nSo with that in mind I'd rather pick option 1 and stop mentioning the\noption in git-pull(1). But that's only a preference of myself, not a\nstrong \"no\", and am very happy to be convinced otherwise.\n\nSo unless somebody does feel strongly that `--prune-tags` should exist\nand provides the patches, my proposal would be to remove the mention of\n`--prune-tags` from git-pull(1) for now. We can then add it back in if\nsomebody does implement the option in the future.\n\nPatrick\n"}]}