Re: [PATCH] Restore ls-remote reference pattern matching
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 9, 2007, 03:22 UTC
- Message-ID
- <7vodd0tuuu.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <Pine.LNX.4.64.0712082134350.5349@iabervon.org>
Daniel Barkalow <barkalow@iabervon.org> writes:
> How's this? I vaguely tested it, and it doesn't break existing tests, and > it matches my guess at how the old code worked, at least maybe.
Well, contrib/examples/git-ls-remote.sh is your friend and you do not have to "guess".
It did, for each ref $path it got from peek-remote, this:
for pat do case "/$path" in */$pat ) match=yes break ;; esac done
I do not think pathspec_match() matches the string in a way compatible with the above loop, and calling get_pathspec(prefix, argv) with anything but a real path is a misuse of the interface.
I think if you do fnmatch(3) that would be compatible with the shell loop.