Thread (1 message) 1 message, 1 author, 2019-03-11

Re: [PATCH 1/2] legacy stash: fix "rudimentary backport of -q"

From: Junio C Hamano <hidden>
Date: 2019-03-11 07:27:12

"Johannes Schindelin via GitGitGadget" [off-list ref]
writes:
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.
Thanks.  I agree that these eval are evaluating one iteration too
much.
quoted hunk
Signed-off-by: Johannes Schindelin <redacted>
---
 git-legacy-stash.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/git-legacy-stash.sh b/git-legacy-stash.sh
index 8a8c4a9270..f60e9b3e87 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help