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>
maint
parent
ff7f22f36e
commit
0c7a97fafd
|
|
@ -111,16 +111,14 @@ expand_refs_wildcard () {
|
||||||
local_force=
|
local_force=
|
||||||
test "z$lref" = "z$ref" || local_force='+'
|
test "z$lref" = "z$ref" || local_force='+'
|
||||||
echo "$ls_remote_result" |
|
echo "$ls_remote_result" |
|
||||||
|
sed -e '/\^{}$/d' |
|
||||||
(
|
(
|
||||||
IFS=' '
|
IFS=' '
|
||||||
while read sha1 name
|
while read sha1 name
|
||||||
do
|
do
|
||||||
|
# ignore the ones that do not start with $from
|
||||||
mapped=${name#"$from"}
|
mapped=${name#"$from"}
|
||||||
if test "z$name" != "z${name%'^{}'}" ||
|
test "z$name" = "z$mapped" && continue
|
||||||
test "z$name" = "z$mapped"
|
|
||||||
then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
echo "${local_force}${name}:${to}${mapped}"
|
echo "${local_force}${name}:${to}${mapped}"
|
||||||
done
|
done
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue