From: Michael Loeffler Date: Wed, 06 Dec 2006 18:16:40 GMT Subject: Re: [PATCH 2/3] git-fetch: do not use "*" for fetching multiple refs Message-ID: <1165429001.993.35.camel@ibook.zvpunry.de> In-Reply-To: Am Mittwoch, den 06.12.2006, 17:58 +0100 schrieb Jakub Narebski: ... > We could use perl for that, but embedded perl is a bit horrible. I had the same idea after the sed problems with macos/solaris, but embedded perl is really a bit horrible. ... > '*' in destination part would mean $n / \n (n-th match for *). > And you need some way to mark if it is prefix match, or whole path match. > Ending prefix match with '/' is one way of doing this... Unless it would > be prefix match always, but I think this leads way to confusion. Then we could just use (.*) and \1..9 and use extended REs. The only problem is this stupid sed thing, only GNU-sed has the -r option to use extended REs. > Just a thought. I would prefer the following ways to do this globfetch stuff: 1.) The original refspec: Pull: refs/heads/master:refs/remotes/origin/master 2.) The one with "prefix match": Pull: refs/heads/:refs/remotes/origin/ 3.) The one with extended regex: Pull: refs/heads/(.*):refs/remotes/origin/\1