When $arg is a normal string, treat it as shell-quoted. But still treat expanded args as plain strings, otherwise it breaks for filenames with spaces

This commit is contained in:
Nathan Broadbent
2011-12-23 11:51:08 +08:00
parent d5080aa3d3
commit 0784e99eef

View File

@@ -166,7 +166,7 @@ git_expand_args() {
else else
echo -n " " echo -n " "
fi fi
printf '%s' "$arg" printf '%q' "$arg"
fi fi
done done
} }