Code

git-stash: fix "can't shift that many" with no arguments
authorJeff King <peff@peff.net>
Mon, 2 Jul 2007 04:20:34 +0000 (00:20 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 2 Jul 2007 04:38:27 +0000 (21:38 -0700)
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-stash.sh

index ec18ef6d46e5c44330f60fa52ddadde08b242e0c..7644bd5a23d46bdcb5f8da00e2e21bce184a1669 100755 (executable)
@@ -133,7 +133,7 @@ apply_stash () {
 # Main command set
 case "$1" in
 list | '')
-       shift
+       test $# -gt 0 && shift
        if test $# = 0
        then
                set x -n 10