#777690 git: bad output order on "git tag --sort=version:refname"

Package:
git
Source:
git
Description:
fast, scalable, distributed revision control system
Submitter:
"Ph. Marek"
Date:
2015-02-11 14:57:07 UTC
Severity:
normal
#777690#5
Date:
2015-02-11 14:27:31 UTC
From:
To:
The tag sorting order is broken; the "version" specification doesn't
special-case "rc" or "pre" etc.

For example, on a Linux Kernel repository:

    # git tag --sort=version:refname
    ...
    v3.18-rc6
    v3.18-rc7
    v3.19
    v3.19-rc1
    v3.19-rc2
    v3.19-rc3

I know that "sort" doesn't know about that either, but "git" should
understand these special tags - or, at least, provide a "--sort=time" to
sort by commit timestamp instead, so that it's easy to get the newest tag.

That would at least be chronologically; it still wouldn't work with
multiple release branches, but it would be an additional option at least.


Thank you.

#777690#10
Date:
2015-02-11 14:54:37 UTC
From:
To:
It is a known issue since the beginning [1]. Hopefully this bug would
push me to actually do something about it :-)

[1] http://thread.gmane.org/gmane.comp.version-control.git/242392/focus=242822

#777690#15
Date:
2015-02-11 14:54:37 UTC
From:
To:
It is a known issue since the beginning [1]. Hopefully this bug would
push me to actually do something about it :-)

[1] http://thread.gmane.org/gmane.comp.version-control.git/242392/focus=242822