threads / patch / 8800

patchgit-stash: fix "can't shift that many" with no arguments

Subject: [PATCH] git-stash: fix "can't shift that many" with no arguments

## tl;dr

One message between Jul 2, 2007 and Jul 2, 2007. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Jeff King· Jul 2, 2007, 04:20 UTC · lore
Signed-off-by: Jeff King <peff@peff.net>
---
 git-stash.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to git-stash.sh +1 −1
diff --git a/git-stash.sh b/git-stash.sh
index ec18ef6..7644bd5 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -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
-- 
1.5.2.2.1452.g896f6

← back to recent threads