{"thread":{"id":"21739","subject":"git tag listing order","startedAt":"2009-11-24T15:56:09Z","lastAt":"2009-11-24T19:24:28Z","messageCount":3,"participants":["Peter van der Does","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"128252","messageId":"20091124105609.0980e796@montecarlo.grandprix.int","threadId":"21739","inReplyTo":null,"subject":"git tag listing order","fromName":"Peter van der Does","fromEmail":"peter@ourvirtualhome.com","sentAt":"2009-11-24T15:56:09Z","receivedAt":"2009-11-24T15:56:09Z","isPatch":false,"sender":{"key":"peter@ourvirtualhome.com","avatar":"https://gravatar.com/avatar/b25de625e7ec33ce8ffc0b09abb0b92ced3882881c0eeaf5961d0023608dac2f?d=mp&s=160"},"body":"I'm using git 1.6.5.3 on Ubuntu and was wondering if there is a way to\nlist tags in order of when they were added to the tree, instead of\nalphabetical?\n\n\n-- \nPeter van der Does\n\nGPG key: E77E8E98\nTwitter: @petervanderdoes\ngit Ubuntu Packages:\nhttp://blog.avirtualhome.com/git-packages-for-ubuntu/\n"},{"id":"128255","messageId":"20091124185947.GA24409@coredump.intra.peff.net","threadId":"21739","inReplyTo":"20091124105609.0980e796@montecarlo.grandprix.int","subject":"Re: git tag listing order","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-11-24T19:00:23Z","receivedAt":"2009-11-24T19:00:23Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Nov 24, 2009 at 10:56:09AM -0500, Peter van der Does wrote:\n\n> I'm using git 1.6.5.3 on Ubuntu and was wondering if there is a way to\n> list tags in order of when they were added to the tree, instead of\n> alphabetical?\n\nYou can use for-each-ref with its sort option:\n\n  git for-each-ref --sort=taggerdate --format='%(refname:short)' refs/tags\n\nThough note that unannotated tags will have no taggerdate, and will all\nsort to the front of the list. To exclude them, I think you'd have to\nuse a special format to grep and sort yourself. Something like:\n\n  git for-each-ref \\\n    --format='%(taggerdate:iso8601) %(refname:short)' refs/tags |\n    grep -v '^ ' |\n    sort |\n    cut -d' ' -f4-\n\n-Peff\n"},{"id":"128258","messageId":"20091124142428.514564d6@montecarlo.grandprix.int","threadId":"21739","inReplyTo":"20091124185947.GA24409@coredump.intra.peff.net","subject":"Re: git tag listing order","fromName":"Peter van der Does","fromEmail":"peter@ourvirtualhome.com","sentAt":"2009-11-24T19:24:28Z","receivedAt":"2009-11-24T19:24:28Z","isPatch":false,"sender":{"key":"peter@ourvirtualhome.com","avatar":"https://gravatar.com/avatar/b25de625e7ec33ce8ffc0b09abb0b92ced3882881c0eeaf5961d0023608dac2f?d=mp&s=160"},"body":"On Tue, 24 Nov 2009 14:00:23 -0500\nJeff King <peff@peff.net> wrote:\n\n> On Tue, Nov 24, 2009 at 10:56:09AM -0500, Peter van der Does wrote:\n> \n> > I'm using git 1.6.5.3 on Ubuntu and was wondering if there is a way\n> > to list tags in order of when they were added to the tree, instead\n> > of alphabetical?\n> \n> You can use for-each-ref with its sort option:\n> \n>   git for-each-ref --sort=taggerdate --format='%(refname:short)'\n> refs/tags\n> \n> Though note that unannotated tags will have no taggerdate, and will\n> all sort to the front of the list. To exclude them, I think you'd\n> have to use a special format to grep and sort yourself. Something\n> like:\n> \n>   git for-each-ref \\\n>     --format='%(taggerdate:iso8601) %(refname:short)' refs/tags |\n>     grep -v '^ ' |\n>     sort |\n>     cut -d' ' -f4-\n> \n> -Peff\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n\nThanks for the info, just what I was looking for.\n\n-- \nPeter van der Does\n\nGPG key: E77E8E98\nTwitter: @petervanderdoes\ngit Ubuntu Packages:\nhttp://blog.avirtualhome.com/git-packages-for-ubuntu/\n"}]}