aboutsummaryrefslogtreecommitdiff
path: root/git-parse-remote.sh
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-12-18 12:13:46 -0800
committerJunio C Hamano <junkio@cox.net>2006-12-18 12:13:46 -0800
commit0c7a97fafdaf7911183807019dbbb4d8c5079c4e (patch)
treea4298ecbf842d8bb9bdd01463332ed9831bb063f /git-parse-remote.sh
parentff7f22f36e2931db7683121f20ee2e03bd426096 (diff)
downloadgit-0c7a97fafdaf7911183807019dbbb4d8c5079c4e.tar.gz
git-0c7a97fafdaf7911183807019dbbb4d8c5079c4e.tar.xz
parse-remote::expand_refs_wildcard()
Work around dash incompatibility by not using "${name%'^{}'}". Noticed by Jeff King; dash seems to mistake the closing brace inside the single quote as the terminating brace for parameter expansion. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-parse-remote.sh')
-rwxr-xr-xgit-parse-remote.sh8
1 files changed, 3 insertions, 5 deletions
diff --git a/git-parse-remote.sh b/git-parse-remote.sh
index 6ae534bf8..bc881cc5f 100755
--- a/git-parse-remote.sh
+++ b/git-parse-remote.sh
@@ -111,16 +111,14 @@ expand_refs_wildcard () {
local_force=
test "z$lref" = "z$ref" || local_force='+'
echo "$ls_remote_result" |
+ sed -e '/\^{}$/d' |
(
IFS=' '
while read sha1 name
do
+ # ignore the ones that do not start with $from
mapped=${name#"$from"}
- if test "z$name" != "z${name%'^{}'}" ||
- test "z$name" = "z$mapped"
- then
- continue
- fi
+ test "z$name" = "z$mapped" && continue
echo "${local_force}${name}:${to}${mapped}"
done
)