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, 18:27 UTC
Message-ID
<el71tj$edm$1@sea.gmane.org>
In-Reply-To
<1165429001.993.35.camel@ibook.zvpunry.de>
Michael Loeffler wrote:
>> 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.
Or you can rewrite git-fetch in Perl (or as built-in in C).
Show 7 quoted lines
> 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/
I just worry what would happen when someone would write e.g.
      Pull: refs/heads/:refs/heads/origin-
 
> 3.) The one with extended regex:
>     Pull: refs/heads/(.*):refs/remotes/origin/\1
3.) The one with shell-like (fnmatch / glob) globbing
      Pull: refs/heads/*:refs/remotes/origin/*

By the way, with globbing we really need some other way than first Pull: line to select remote head to merge on "git pull". For example "Merge:" line / remote.<name>.merge config var.

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Previous: Michael LoefflerNext: Junio C Hamano
Message 6 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.