git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/3] git-fetch: do not use "*" for fetching multiple refs

From
Jakub Narebski <jnareb@gmail.com>
Date
Dec 6, 2006, 16:58 UTC
Message-ID
<el6sni$re3$1@sea.gmane.org>
In-Reply-To
<1165422865.29714.13.camel@ibook.zvpunry.de>
Michael Loeffler wrote:
Show 8 quoted lines
> Am Montag, den 04.12.2006, 20:48 +0100 schrieb Jakub Narebski:
> ...
>> I'm not sure if regexp support is truly better than the usual path globbing,
>> as in fnmatch / glob.
>
> The current code does not do a real glob, this was the reason for me to
> think about regex support, I thought it is easy to use sed for this. Now
> I know it better.
We could use perl for that, but embedded perl is a bit horrible.
Show 9 quoted lines
> I want it a bit portable, but sed on other systems (like macos or
> solaris) does not support extended REs, and the basic REs do not support
> the | operator (but this works on systems with glibc with \|).
> 
> Maybe we should support something like this:
> Pull: refs/heads/v*:refs/remotes/origin/
> 
> I still don't like the * on the destination ref, it looks a bit strange
> (like cp Downloads/*.mp3 Music/*).

'*' 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.

Just a thought.
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Previous: Michael LoefflerNext: Michael Loeffler
Message 4 of 11 in “git-fetch: do not use "*" for fetching multiple refs”
  1. 2/3 git-fetch: do not use "*" for fetching multiple refsMichael Loeffler, Dec 4, 2006
  2. Jakub NarebskiDec 4, 2006
  3. Michael LoefflerDec 6, 2006
  4. Jakub NarebskiDec 6, 2006
  5. Michael LoefflerDec 6, 2006
  6. Jakub NarebskiDec 6, 2006
  7. Junio C HamanoDec 6, 2006
  8. Junio C HamanoDec 6, 2006
  9. Johannes SchindelinDec 6, 2006
  10. Jakub NarebskiDec 6, 2006
  11. Michael LoefflerDec 4, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.