Re: Unexpected (bug-like) behavior in `git ls-remote` matching.

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

 



Jeff King <peff@xxxxxxxx> writes:

> Oh, and I forgot to mention: the documentation for ls-remote is quite
> weak here, and simply says "matching" without defining it. So the most
> obvious improvement is fixing that documentation to describe the current
> rules (which AFAIK is basically matching the pattern as a glob, but with
> an implicit "/" anchor, but somebody should double check the code before
> writing a documentation patch).

Very much.  

On the pattern side we add */ in front of the given pattern (so,
'master' becomes "*/master", and 'refs/heads/master' becomes
'*/refs/heads/master), and run wildmatch() against refs prefixed
with '/' (so 'refs/heads/master' becomes '/refs/heads/master' and
matches '*/master', and it also matches '*/refs/heads/master').

THanks.





[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