Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:05:52

Jacob Keller [off-list ref] writes:
On Thu, Jul 23, 2015 at 11:01 AM, Junio C Hamano [off-list ref] wrote:
quoted
Jacob Keller [off-list ref] writes:
quoted
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?
...
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.
If your build people refuse to switch from an unreliable way of
parsing "log" output that is not meant for machine consumption, then
it wouldn't make any difference what the answer to your "I'm not
sure if doing it built into ... be faster?" X-<.

By the way, I was referring to that question, pointing out that you
do not have be wondering.  It is already there, and as I said a few
messages ago already in this thread, the cross-pollination among
"for-each-ref", "branch -l" and "tag -l" is happening as part of
this year's GSoC program.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help