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>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Michael Loeffler 2006-12-04 20:34:34 +01:00 committed by Junio C Hamano
parent b360cca0b1
commit 4cd75359ad

View file

@ -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