All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Daniel Barkalow <barkalow@iabervon.org>
Cc: git@vger.kernel.org, Eyvind Bernhardsen <eyvind-git@orakel.ntnu.no>
Subject: Re: [PATCH] Restore ls-remote reference pattern matching
Date: Sat, 08 Dec 2007 19:22:49 -0800	[thread overview]
Message-ID: <7vodd0tuuu.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0712082134350.5349@iabervon.org> (Daniel Barkalow's message of "Sat, 8 Dec 2007 21:35:48 -0500 (EST)")

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.

  reply	other threads:[~2007-12-09  3:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-09  2:35 [PATCH] Restore ls-remote reference pattern matching Daniel Barkalow
2007-12-09  3:22 ` Junio C Hamano [this message]
2007-12-09  5:16   ` Daniel Barkalow
2007-12-09  6:51     ` Junio C Hamano
2007-12-09 13:26       ` Sergey Vlasov
2007-12-09 15:31         ` Eyvind Bernhardsen
2007-12-09 18:15         ` Junio C Hamano
2007-12-09 20:26         ` Junio C Hamano
2007-12-10  9:16           ` Eyvind Bernhardsen
2007-12-10  9:56             ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vodd0tuuu.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=barkalow@iabervon.org \
    --cc=eyvind-git@orakel.ntnu.no \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.