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

Re: [PATCH 3/3] git-fetch: allow glob pattern in refspec

From
MLMichael Loeffler <miloeffler@googlemail.com>
Date
Nov 27, 2006, 18:14 UTC
Message-ID
<1164651262.13153.31.camel@ibook.zvpunry.de>
In-Reply-To
<7vzmaik4mi.fsf@assigned-by-dhcp.cox.net>
hi,
Am Mittwoch, den 22.11.2006, 23:24 -0800 schrieb Junio C Hamano: 
> This adds Andy's refspec glob.  You can have a single line:
> 
> 	Pull: refs/heads/*:refs/remotes/origin/*
How about using extended regex for this, something like this:
Pull: refs/heads/master:refs/remotes/origin/master
Pull: refs/tags/v(.*):refs/tags/origin/v\1
... 
> +expand_refs_wildcard () {
> +	for ref
> +	do

... How about using something like: echo "$ls_remote_result" | sed -n -r -e "s:$ref: p"

Using $ref as a part of the sed expression is not a good idea (.* should not match past the ':'), but something like this maybe. What do you think?

bye
Previous: Andy Parkins
Message 3 of 3 in “git-fetch: allow glob pattern in refspec”
  1. 3/3 git-fetch: allow glob pattern in refspecJunio C Hamano, Nov 23, 2006
  2. Andy ParkinsNov 23, 2006
  3. Michael LoefflerNov 27, 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.