Re: question re: git show-ref and matching ref patterns from the front

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

 



On Sat, Apr 10, 2021 at 6:54 PM brian m. carlson
<sandals@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> On 2021-04-11 at 01:24:57, Chris Jerdonek wrote:
> > However, is there a way to limit Git to showing refs starting with a
> > prefix, and that doesn't also require Git to iterate over all refs?
>
> I believe you can do this with git for-each-ref.  It accepts prefixes,
> and assuming you don't use a case-insensitive comparison, it will
> restrict itself to iterating over only those prefixes you specify, not
> all refs.

Thanks. One minor difference, though, seems to be that git
for-each-ref doesn't support including the HEAD ref, which you can do
with git-show-ref by passing ---head.

--Chris



[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