From: Ramkumar Ramachandra Date: Sat, 15 Jun 2013 13:13:24 +0000 (+0530) Subject: stash: simplify option parser for create X-Git-Tag: v1.8.4-rc0~117^2~2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/0719f300870cb573dcb526c7ab0cdffc5ee54324?hp=--cc 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 Signed-off-by: Junio C Hamano --- 0719f300870cb573dcb526c7ab0cdffc5ee54324 diff --git a/git-stash.sh b/git-stash.sh index bbefdf6424..64800b8c94 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)