Re: Feature Request: Passing a number as an option to git tags for displaying latest tags

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

 



On Thu, Jul 23, 2015 at 11:01 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Jacob Keller <jacob.keller@xxxxxxxxx> writes:
>
>> Yep, that's pretty much how a build system I've had to use does it.
>> Sadly, this is quite slow, and I'm not sure if doing it built into the
>> tag via for-each-ref would be faster?
>
> Is the description in "git for-each-ref --help" somehow unreadable?
>
>        An example directly producing formatted text. Show the most
>        recent 3 tagged commits:
>
>            #!/bin/sh
>
>            git for-each-ref --count=3 --sort='-*authordate' \
>            --format='From: %(*authorname) %(*authoremail)
>            Subject: %(*subject)
>            Date: %(*authordate)
>            Ref: %(*refname)
>
>            %(*body)
>            ' 'refs/tags'
>
> If you only need the name of the ref, you can use a lot simpler
> format string, e.g.
>
>     git for-each-ref --count=3 --sort='-*authordate' \
>       --format='%(refname:short)' refs/tags
>
>     git for-each-ref --count=3 --sort='-taggerdate' \
>       --format='%(refname:short)' refs/tags
>

That's significantly better than what this system does, but sadly the
team that owns it doesn't exactly understand git. Pretty sure they
tend to just use whatever scriptlet they got working, which happens to
be based on log...  I've tried to help them, but generally hasn't been
a successful relationship there.

Regards,
Jake
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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]