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

Re: Adding glob support to remotes

From
APAndy Parkins <andyparkins@gmail.com>
Date
Nov 22, 2006, 14:41 UTC
Message-ID
<200611221441.02459.andyparkins@gmail.com>
In-Reply-To
<7v7ixnskql.fsf@assigned-by-dhcp.cox.net>
On Wednesday 2006 November 22 12:56, Junio C Hamano wrote:
Show 9 quoted lines
> > However, git-ls-remote needs the name of the remote repository (of
> > course), but that isn't directly available in git-parse-remote.sh.
>
> Is it really the case?  I do not remember the details offhand,
> but I do not think canon_refs_list_for_fetch is the function you
> should be messing with to implement the remote."origin".fetch
> stuff.  It should be get_remote_default_refs_for_fetch().  The
> function returns the list based on which remote, so it surely
> knows which remote the caller is talking about.

The problem is that canon_refs_list_for_fetch bombs out too early because "*" is not an acceptable name for a ref.

Show 5 quoted lines
> However, I would recommend against actually running ls-remote to
> help "git-fetch" inside git-parse-remote.sh.  I think you should
> run ls-remote upfront early in git-fetch because there are at
> least two other parts in git-fetch that wants the same ls-remote
> output:

Okay. That's what I'll do. It means altering git-check-ref-format to prevent the early bomb out. Perhaps I should move this check to somewhere after I've done the reflist expansion?

>  (1) dumb protocols currently cannot deal with a remote that has

I'm not sure I've understood this point. I shall look at git-fetch.sh more closely to try and address this though.

>  (2) when doing a fetch with tracking branches (which is what
Accepted.
Andy
-- 
Dr Andy Parkins, M Eng (hons), MIEE
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 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.