Re: Unify annotated and non-annotated tags

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

 



On Sat, Nov 11, 2017 at 5:06 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Igor Djordjevic <igor.d.djordjevic@xxxxxxxxx> writes:
>
>> If you would like to mimic output of "git show-ref", repeating
>> commits for each tag pointing to it and showing full tag name as
>> well, you could do something like this, for example:
>>
>>       for tag in $(git for-each-ref --format="%(refname)" refs/tags)
>>       do
>>               printf '%s %s\n' "$(git rev-parse $tag^0)" "$tag"
>>       done
>>
>>
>> Hope that helps a bit.
>
> If you use for-each-ref's --format option, you could do something
> like (pardon a long line):
>
> git for-each-ref --format='%(if)%(*objectname)%(then)%(*objectname)%(else)%(objectname)%(end) %(refname)' refs/tags
>
> without any loop, I would think.

This doesn't work with git 1.9.1
https://github.com/rtfd/readthedocs.org/pull/3441#issuecomment-353567756
When it was added? I searched through GitHub and docs, but can't find any
historical records.

-- 
anatoly t.



[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