stash: simplify option parser for create
authorRamkumar Ramachandra <artagnon@gmail.com>
Sat, 15 Jun 2013 13:13:24 +0000 (18:43 +0530)
committerJunio C Hamano <gitster@pobox.com>
Mon, 17 Jun 2013 16:22:12 +0000 (09:22 -0700)
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>
git-stash.sh
index bbefdf64244063f4708f381b8a772466d64e90e5..64800b8c945cbb478797eaa564c7c857494a6f44 100755 (executable)
@@ -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)