git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Jeff King <peff@peff.net>
Date
Jul 2, 2007, 04:20 UTC
Message-ID
<20070702042034.GB29384@coredump.intra.peff.net>
Signed-off-by: Jeff King <peff@peff.net>
---
 git-stash.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
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
Message 1 of 1 in “git-stash: fix "can't shift that many" with no arguments”
  1. git-stash: fix "can't shift that many" with no argumentsJeff King, Jul 2, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.