Re: Fw: git describe issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 3, 2019 at 1:00 AM Amiel Elboim <amielel@xxxxxxxxxxxx> wrote:
>
> Very helpful!  annotated tag is good solution for us.
>
> However fix of this issue is important, because it's confusing when you want to track on your version using git tags.

Lightweight tags have no metadata to allow for ordering, so I'm not
sure there's something to "fix" here. Given the tags have identical
timestamps, Git simply displays the one that's first alphabetically.

Git does have some ability to parse versions and sort them, on newer
versions, but there's no way to activate that via "git describe
--tags", at least as far as I'm aware (and I'm not sure how reliable
it can be, given tag names are essentially free-form text).

You can try Git's version sorting with a command like "git tag
--sort=-v:refname" (The "-" before "v:refname" sorts in descending
order)

incom@Jael MINGW64 /c/Temp/fourth.git (BARE:master)
$ git tag
v1
v2
incom@Jael MINGW64 /c/Temp/fourth.git (BARE:master)
$ git tag --sort=-v:refname
v2
v1

Since you can't enable that for "git describe --tags", though, I'm not
sure it's helpful. (Someone else can correct me if there is a way to
make "git describe" do that.)

Bryan

(Re-added the list on CC)



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux