gitx icon indicating copy to clipboard operation
gitx copied to clipboard

Tags should be shown in reverse alphabetical order (~newest at top)

Open astubbs opened this issue 15 years ago • 5 comments
trafficstars

atm, the order is 0.1 1.5 etc...

should be 1.5 0.1 at the bottom

that would be nice :)

astubbs avatar Apr 15 '10 00:04 astubbs

Currently it is being sorted alphanumerically. If it's changed to reverse the sort then tags with letters will be reversed. And if number only tags are reversed how should tags like "v0.1" be dealt with?

brotherbard avatar Apr 28 '10 21:04 brotherbard

very good point. I guess there's no "datestamp" associated with tags? Newest first? - If there isn't, I suppose you could look at the date of the commit that the tag points to?

astubbs avatar Apr 29 '10 02:04 astubbs

Annotated tags have a date but regular ones don't. But maybe looking at the commit would work.

brotherbard avatar Apr 29 '10 02:04 brotherbard

I would suggest displaying all annotated tags, sorted by tag object date. Then after that, display all non-annotated tags, sorted lexicographically.

lilyball avatar Aug 25 '10 02:08 lilyball

At first I liked this idea, but after some thought I don't anymore.

I think the current sort is correct. It's the whole point of semantic versioning "Precedence SHOULD be determined by lexicographic ASCII sort order" because that order is the default behavior everywhere. Reversing it is not a standard, just a common practice for those using semantic versioning.

However, not everybody uses semantic versioning. Having tags sort the way everything else on a computer sorts is predictable so you don't break somebody else's tagging structure.

Sorting by two lists (annotated and non-annotated) would become a mess for some of our repositories where some devs are new to git and don't annotate their tags.

ryanflorence avatar Sep 13 '10 15:09 ryanflorence