@matheusbsbs / matheus-bagliano / commits / f300fab544
Fork 0

DWIM 'git stash save -p' for 'git stash -p'

Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Thomas Rast committed Aug 13, 2009 at 14:29 UTC f300fab5440f25aabb22c6d1fec411ee10e154b1
2 files changed +3 -3
Documentation/git-stash.txt
+1 -1
@@ -14,7 +14,7 @@ SYNOPSIS
14 'git stash' ( pop | apply ) [--index] [-q|--quiet] [<stash>]
15 'git stash' branch <branchname> [<stash>]
16 'git stash' [save [--patch] [-k|--[no-]keep-index] [-q|--quiet] [<message>]]
17 -'git stash' [-k|--keep-index]
17 +'git stash' [-p|--patch|-k|--keep-index]
18 'git stash' clear
19 'git stash' create
20
git-stash.sh
+2 -2
@@ -406,8 +406,8 @@ branch)
406 apply_to_branch "$@"
407 ;;
408 *)
409 - case $#,"$1" in
410 - 0,|1,-k|1,--keep-index)
409 + case $#,"$1","$2" in
410 + 0,,|1,-k,|1,--keep-index,|1,-p,|1,--patch,|2,-p,--no-keep-index|2,--patch,--no-keep-index)
411 save_stash "$@" &&
412 say '(To restore them type "git stash apply")'
413 ;;