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

Adding glob support to remotes

From
APAndy Parkins <andyparkins@gmail.com>
Date
Nov 22, 2006, 09:04 UTC
Message-ID
<200611220904.21850.andyparkins@gmail.com>
Hello,

I'm working on adding (basic) glob support to remote fetch definitions. This is to allow you to write things like

[remote "origin"]
  fetch = refs/heads/*:refs/remotes/upstream/*

I started to add code to git-parse-remote.sh:canon_refs_list_for_fetch() to preprocess the reflist to catch lines with a "*" in them then use the remote pattern to filter the output of from "git-ls-remote -h", blah, blah, you get the idea...

However, git-ls-remote needs the name of the remote repository (of course), 
but that isn't directly available in git-parse-remote.sh.  Should I
 a) pass it as a parameter from git-fetch.sh right through each intermediate 
function
 b) create a global?
 c) change git-check-ref-format to allow "*" in the name, then put the 
git-ls-remote call in git-fetch instead.

I don't like to do (b) as it's nasty programming behaviour; however passing a parameter is fairly intrusive to the existing code. Similarly (c) means I'm messing in places I suspect I shouldn't be (git-check-ref-format).

git-gods - what do I do?
Andy
-- 
Dr Andy Parkins, M Eng (hons), MIEE
Next: Junio C Hamano
Message 1 of 5 in “Adding glob support to remotes”
  1. Andy ParkinsNov 22, 2006
  2. Junio C HamanoNov 22, 2006
  3. Andy ParkinsNov 22, 2006
  4. Junio C HamanoNov 22, 2006
  5. Andy ParkinsNov 23, 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.