{"thread":{"id":"17951","subject":"[PATCH/RFC 0/6] sort tags by date (git tag -l -D)","startedAt":"2009-02-22T18:06:33Z","lastAt":"2009-02-23T09:11:51Z","messageCount":3,"participants":["Marc-André Lureau","Thomas Rast"],"isPatch":true,"patchVersion":1,"patchTotal":6},"messages":[{"id":"105795","messageId":"e29894ca0902221006s1c1af9f9o8c13ff9e06670d95@mail.gmail.com","threadId":"17951","inReplyTo":null,"subject":"[PATCH/RFC 0/6] sort tags by date (git tag -l -D)","fromName":"Marc-André Lureau","fromEmail":"marcandre.lureau@gmail.com","sentAt":"2009-02-22T18:06:33Z","receivedAt":"2009-02-22T18:06:33Z","isPatch":true,"sender":{"key":"marcandre.lureau@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9381?v=4"},"body":"Hi,\n\nI needed to sort my tags by date, and not only the annotated tags. I\nwas surprised that git tag didn't know how to do that. May be it could\nbe handled simply by some shell script. Please tell me :)\n\nTake this patch series easy, it's only a RFC. I had some fun hacking\nthe code, that's the most important for me. I would be happy to take\ncomment.\n\nSomething I wish I could do is also have a better pretty_print_tag()\nto have customized format (or may be it should be in git log instead?)\n\nI tried different approach to deal with light tags, and none was\nreally good. In the end, I decided to use the \"object\" base type, and\nhave a private light_tag type. There might be different solutions to\nthat. I am happy to discuss them.\n\nregards,\n\nMarc-Andre Lureau (6):\n  tag: read signature\n  tag: parse the date\n  tag: copy parsed buffer unconditionnaly\n  object: add one bit to let creation of private types (OBJ_MAX + n)\n  builtin-tag: add sort by date -D\n  test: add simple sorted tag test\n\n builtin-tag.c  |  162 ++++++++++++++++++++++++++++++++++++++++++++-----------\n object.h       |    2 +-\n t/t7004-tag.sh |   53 ++++++++++++++++++\n tag.c          |   17 +++++-\n tag.h          |    5 ++-\n 5 files changed, 201 insertions(+), 38 deletions(-)\n"},{"id":"105886","messageId":"200902231004.25784.trast@student.ethz.ch","threadId":"17951","inReplyTo":"e29894ca0902221006s1c1af9f9o8c13ff9e06670d95@mail.gmail.com","subject":"Re: [PATCH/RFC 0/6] sort tags by date (git tag -l -D)","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2009-02-23T09:04:23Z","receivedAt":"2009-02-23T09:04:23Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Marc-André Lureau wrote:\n> I needed to sort my tags by date, and not only the annotated tags.\n\nAs others have pointed out, there's no sane way to sort \n\n> I was surprised that git tag didn't know how to do that. May be it\n> could be handled simply by some shell script. Please tell me :)\n\nModulo timezone differences\n\n  git for-each-ref --format=\"%(taggerdate:raw)%(committerdate:raw) %(refname:short)\" refs/tags | sort -n | cut -d\\  -f3\n\nFor some neat reason only one of the dates is displayed, depending on\nthe type of object.\n\n(Interestingly, the v0.99 tag in git.git doesn't have a date or\ntagger...)\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"},{"id":"105888","messageId":"200902231011.54574.trast@student.ethz.ch","threadId":"17951","inReplyTo":"200902231004.25784.trast@student.ethz.ch","subject":"Re: [PATCH/RFC 0/6] sort tags by date (git tag -l -D)","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2009-02-23T09:11:51Z","receivedAt":"2009-02-23T09:11:51Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Thomas Rast wrote:\n> Marc-André Lureau wrote:\n> > I needed to sort my tags by date, and not only the annotated tags.\n> \n> As others have pointed out, there's no sane way to sort\n... lightweight tags of blobs or trees.\n\n*sigh*\n\nAlso, do not take my shell command to mean that I don't like this\nseries.  It would be nice to have a porcelain feature for it.\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"}]}