Skip to content

Commit 006a866

Browse files
peffgitster
authored andcommitted
git-stash: fix "can't shift that many" with no arguments
Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent aaca491 commit 006a866

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-stash.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ apply_stash () {
133133
# Main command set
134134
case "$1" in
135135
list | '')
136-
shift
136+
test $# -gt 0 && shift
137137
if test $# = 0
138138
then
139139
set x -n 10

0 commit comments

Comments
 (0)