summaryrefslogtreecommitdiff
path: root/git-stash.sh
diff options
context:
space:
mode:
authorRamkumar Ramachandra <artagnon@gmail.com>2013-06-15 13:13:24 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-06-17 16:22:12 (GMT)
commit0719f300870cb573dcb526c7ab0cdffc5ee54324 (patch)
tree961cabf2fa05e8b4c59056975a6123737509a370 /git-stash.sh
parentaa7e722dfee957e89476d0467427a5a32d0040f7 (diff)
downloadgit-0719f300870cb573dcb526c7ab0cdffc5ee54324.zip
git-0719f300870cb573dcb526c7ab0cdffc5ee54324.tar.gz
git-0719f300870cb573dcb526c7ab0cdffc5ee54324.tar.bz2
stash: simplify option parser for create
The option parser for create unnecessarily checks "$1" inside a case statement that matches "$1" in the first place. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-stash.sh')
-rwxr-xr-xgit-stash.sh5
1 files changed, 1 insertions, 4 deletions
diff --git a/git-stash.sh b/git-stash.sh
index bbefdf6..64800b8 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -546,10 +546,7 @@ clear)
clear_stash "$@"
;;
create)
- if test $# -gt 0 && test "$1" = create
- then
- shift
- fi
+ shift
create_stash "$*" && echo "$w_commit"
;;
drop)