Skip to content

Commit

Permalink
stash: simplify option parser for create
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ramkumar Ramachandra authored and Junio C Hamano committed Jun 17, 2013
1 parent aa7e722 commit 0719f30
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions git-stash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0719f30

Please sign in to comment.