Re: [PATCH 2/3] git-fetch: do not use "*" for fetching multiple refs
- From
- Michael Loeffler <zvpunry@zvpunry.de>
- Date
- Dec 6, 2006, 18:16 UTC
- Message-ID
- <1165429001.993.35.camel@ibook.zvpunry.de>
- In-Reply-To
- <el6sni$re3$1@sea.gmane.org>
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/master2.) The one with "prefix match":
Pull: refs/heads/:refs/remotes/origin/3.) The one with extended regex:
Pull: refs/heads/(.*):refs/remotes/origin/\1