summaryrefslogtreecommitdiff
path: root/git-stash.sh
diff options
context:
space:
mode:
Diffstat (limited to 'git-stash.sh')
-rwxr-xr-xgit-stash.sh15
1 files changed, 11 insertions, 4 deletions
diff --git a/git-stash.sh b/git-stash.sh
index 7ce818bd1b..57f36ce8dd 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -264,8 +264,18 @@ parse_flags_and_rev()
b_tree=
i_tree=
+ # Work around rev-parse --flags eating -q
+ for opt
+ do
+ case "$opt" in
+ -q|--quiet)
+ GIT_QUIET=t
+ ;;
+ esac
+ done
+
REV=$(git rev-parse --no-flags --symbolic "$@" 2>/dev/null)
- FLAGS=$(git rev-parse --no-revs -- "$@" 2>/dev/null)
+ FLAGS=$(git rev-parse --no-revs --flags "$@" 2>/dev/null)
set -- $FLAGS
@@ -273,9 +283,6 @@ parse_flags_and_rev()
while test $# -ne 0
do
case "$1" in
- -q|--quiet)
- GIT_QUIET=-t
- ;;
--index)
INDEX_OPTION=--index
;;