DWIM 'git stash save -p' for 'git stash -p'
[gitweb.git] / git-stash.sh
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")'
                ;;