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

2 messages from 2006-12-04 to 2006-12-05. Participants: Junio C Hamano, Michael Loeffler.
Thread: https://gitlist.dev/t/43604

## Michael Loeffler, 2006-12-04 19:34

Subject: [PATCH 1/3] git-fetch: ignore dereferenced tags in expand_refs_wildcard
Message-ID: <1165260874.20055.4.camel@ibook.zvpunry.de>
URL: https://gitlist.dev/e/1165260874.20055.4.camel%40ibook.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



```

## Junio C Hamano, 2006-12-05 01:08

Subject: Re: [PATCH 1/3] git-fetch: ignore dereferenced tags in expand_refs_wildcard
Message-ID: <7vwt57kv3n.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vwt57kv3n.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <1165260874.20055.4.camel@ibook.zvpunry.de>

```
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 ;-).

```
