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

[PATCH 1/3] git-fetch: ignore dereferenced tags in expand_refs_wildcard

From
MLMichael Loeffler <zvpunry@zvpunry.de>
Date
Dec 4, 2006, 19:34 UTC
Message-ID
<1165260874.20055.4.camel@ibook.zvpunry.de>

There was a little bug in the brace expansion which should remove the ^{} from the tagname. It used ${name#'^{}'} instead of $(name%'^{}'}, the difference is that '#' will remove the given pattern only from the beginning of a string and '%' only from the end of a string.

Signed-off-by: Michael Loeffler <zvpunry@zvpunry.de>
---
 git-parse-remote.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-parse-remote.sh b/git-parse-remote.sh
index 19bc385..da064a5 100755
--- a/git-parse-remote.sh
+++ b/git-parse-remote.sh
@@ -116,7 +116,7 @@ expand_refs_wildcard () {
 			while read sha1 name
 			do
 				mapped=${name#"$from"}
-				if test "z$name" != "z${name#'^{}'}" ||
+				if test "z$name" != "z${name%'^{}'}" ||
 					test "z$name" = "z$mapped"
 				then
 					continue
-- 
1.4.4
Next: Junio C Hamano
Message 1 of 2 in “git-fetch: ignore dereferenced tags in expand_refs_wildcard”
  1. 1/3 git-fetch: ignore dereferenced tags in expand_refs_wildcardMichael Loeffler, Dec 4, 2006
  2. Junio C HamanoDec 5, 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.