summaryrefslogtreecommitdiff
path: root/git-legacy-stash.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2019-03-07 15:29:32 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-03-08 01:37:58 (GMT)
commit7b556aa4b80ddfedb3de25e8787acd6c69d8799c (patch)
tree1cdd2212d82780bef2f1c7c37638353db92e8349 /git-legacy-stash.sh
parent7906af0cb84c8e65656347909abd4e22b04d1c1e (diff)
downloadgit-7b556aa4b80ddfedb3de25e8787acd6c69d8799c.zip
git-7b556aa4b80ddfedb3de25e8787acd6c69d8799c.tar.gz
git-7b556aa4b80ddfedb3de25e8787acd6c69d8799c.tar.bz2
legacy stash: fix "rudimentary backport of -q"
When this developer backported support for `--quiet` to the scripted version of `git stash` in 80590055ea (stash: optionally use the scripted version again, 2018-12-20), it looked like a sane choice to use `eval` to execute the command line passed in via the parameter list of `maybe_quiet`. However, that is not what we should have done, as that command-line was already in the correct shape. This can be seen very clearly when passing arguments with special characters, like git stash -- ':(glob)**/*.txt' Since this is exactly what we want to test in the next commit (where we fix this very incantation with the built-in stash), let's fix the legacy scripted version of `git stash` first. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-legacy-stash.sh')
-rwxr-xr-xgit-legacy-stash.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/git-legacy-stash.sh b/git-legacy-stash.sh
index 8a8c4a9..f60e9b3 100755
--- a/git-legacy-stash.sh
+++ b/git-legacy-stash.sh
@@ -86,17 +86,17 @@ maybe_quiet () {
shift
if test -n "$GIT_QUIET"
then
- eval "$@" 2>/dev/null
+ "$@" 2>/dev/null
else
- eval "$@"
+ "$@"
fi
;;
*)
if test -n "$GIT_QUIET"
then
- eval "$@" >/dev/null 2>&1
+ "$@" >/dev/null 2>&1
else
- eval "$@"
+ "$@"
fi
;;
esac