summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 92c1e71)
raw | patch | inline | side by side (parent: 92c1e71)
author | Jon Seymour <jon.seymour@gmail.com> | |
Mon, 27 Sep 2010 15:32:45 +0000 (01:32 +1000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 29 Sep 2010 20:21:24 +0000 (13:21 -0700) |
This patch simplifies Brian's fix for the recent regression by:
* eliminating the extra loop
* eliminating use of git rev-parse for parsing flags
* making use of the for opt idiom for the retained loop
* eliminating the redundant -- case
The patch has been tested with the tests in current maint.
Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* eliminating the extra loop
* eliminating use of git rev-parse for parsing flags
* making use of the for opt idiom for the retained loop
* eliminating the redundant -- case
The patch has been tested with the tests in current maint.
Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-stash.sh | patch | blob | history |
diff --git a/git-stash.sh b/git-stash.sh
index 02113263e3d84b49aae8d2961a53c598c797584d..5fb1245ea74a3029790c4c7886f9c6a32bddaa13 100755 (executable)
--- a/git-stash.sh
+++ b/git-stash.sh
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 --flags "$@" 2>/dev/null)
-
- set -- $FLAGS
FLAGS=
- while test $# -ne 0
+ for opt
do
- case "$1" in
+ case "$opt" in
+ -q|--quiet)
+ GIT_QUIET=-t
+ ;;
--index)
INDEX_OPTION=--index
;;
- --)
- :
- ;;
- *)
- FLAGS="${FLAGS}${FLAGS:+ }$1"
+ -*)
+ FLAGS="${FLAGS}${FLAGS:+ }$opt"
;;
esac
- shift
done
set -- $REV