Re: [PATCH] show-ref: add --unresolved option

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

 



Jeff King <peff@xxxxxxxx> writes:

> You can do:
>
>   git for-each-ref --format='%(refname) %(objectname) %(symref)'

We can even do that "ref target || object name" thing with

--format='%(refname) %(if)%(symref)%(then)%(symref)%(else)%(objectname)'

if we wanted to.  But if we have both available, I think the output
that adds the symref target, if available, after the object name, is
better than the output that switches between the two.

> to get the resolved values next to the symrefs (if any). I think that
> does a full resolution, though (so again, if you had one->two->three,
> you can never learn about the intermediate "two").

Yeah, I know we discussed the usefulness of tag-of-tag-of-something,
but this is a similar one.  

> I think for-each-ref in the above command works by calling
> resolve_refdup() itself, and then recording the result. It would be nice
> to get it from the iterator, though (more efficient, and avoids any
> races).

Indeed.  Thanks for an interesting thought.




[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