threads / patch / 43604

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

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

## tl;dr

2 messages between Dec 4, 2006 and Dec 5, 2006. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Michael Loeffler· Dec 4, 2006, 19:34 UTC · lore

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

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(-)
Show changes to git-parse-remote.sh +1 −1
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
Junio C Hamano· Dec 5, 2006, 01:08 UTC · re: Michael Loeffler · lore
Michael Loeffler <zvpunry@zvpunry.de> writes:
> 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.
Thanks.  Shows that I do not use post 80's shell features ;-).

← back to recent threads