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>

Johannes Schindelin committed Mar 7, 2019 at 07:29 UTC 7b556aa4b80ddfedb3de25e8787acd6c69d8799c
1 file changed +4 -4
git-legacy-stash.sh
+4 -4
@@ -86,17 +86,17 @@ maybe_quiet () {
86 shift
87 if test -n "$GIT_QUIET"
88 then
89 - eval "$@" 2>/dev/null
89 + "$@" 2>/dev/null
90 else
91 - eval "$@"
91 + "$@"
92 fi
93 ;;
94 *)
95 if test -n "$GIT_QUIET"
96 then
97 - eval "$@" >/dev/null 2>&1
97 + "$@" >/dev/null 2>&1
98 else
99 - eval "$@"
99 + "$@"
100 fi
101 ;;
102 esac