From f9f1c00c788447452fadcd3b3208e5d87ae45f34 Mon Sep 17 00:00:00 2001 From: Phil Jackson Date: Wed, 10 Mar 2010 21:19:46 +0000 Subject: [PATCH] C-u will now keep the index when stashing. --- magit.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/magit.el b/magit.el index 93e5dfd2..be54f3fa 100644 --- a/magit.el +++ b/magit.el @@ -2730,7 +2730,10 @@ Prefix arg means justify as well." (defun magit-stash (description) (interactive "sStash description: ") - (magit-run-git "stash" "save" description)) + (apply 'magit-run-git `("stash" + "save" + ,@(when current-prefix-arg '("--keep-index")) + ,description))) (defun magit-stash-snapshot () (interactive)