DWIM 'git stash save -p' for 'git stash -p'
authorThomas Rast <trast@student.ethz.ch>
Thu, 13 Aug 2009 12:29:45 +0000 (14:29 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sat, 15 Aug 2009 22:21:22 +0000 (15:21 -0700)
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-stash.txt
git-stash.sh

index 3dc16a108a15bdb4ea7a86d30dbaa6822969229a..1c4ed412a12ffe6393aa39499169ad8e96d47fcf 100644 (file)
@@ -14,7 +14,7 @@ SYNOPSIS
 'git stash' ( pop | apply ) [--index] [-q|--quiet] [<stash>]
 'git stash' branch <branchname> [<stash>]
 'git stash' [save [--patch] [-k|--[no-]keep-index] [-q|--quiet] [<message>]]
-'git stash' [-k|--keep-index]
+'git stash' [-p|--patch|-k|--keep-index]
 'git stash' clear
 'git stash' create
 
index 81a72f68cc47aed881b618f893d49c776fe52ae8..9fd72894c49b22174c0c10cb3f83fa57314c74fb 100755 (executable)
@@ -406,8 +406,8 @@ branch)
        apply_to_branch "$@"
        ;;
 *)
-       case $#,"$1" in
-       0,|1,-k|1,--keep-index)
+       case $#,"$1","$2" in
+       0,,|1,-k,|1,--keep-index,|1,-p,|1,--patch,|2,-p,--no-keep-index|2,--patch,--no-keep-index)
                save_stash "$@" &&
                say '(To restore them type "git stash apply")'
                ;;