aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2015-08-11 16:39:06 +0200
committerJonas Bernoulli <jonas@bernoul.li>2015-08-11 16:39:06 +0200
commit629e2adcdf5e20e58ad042d0a6f9be1422c30fbd (patch)
treefac38b8814327afc584ed421ba526d4936ea988b /lisp
parentc8d40a2e34eae7ed6fceb4884f3ed6ed105cea80 (diff)
magit-update-index: save to wiprefs if appropriate
Diffstat (limited to 'lisp')
-rw-r--r--lisp/magit.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/magit.el b/lisp/magit.el
index d6a734c..0c94613 100644
--- a/lisp/magit.el
+++ b/lisp/magit.el
@@ -1055,6 +1055,8 @@ is done using `magit-find-index-noselect'."
(if (y-or-n-p (format "Update index with contents of %s" (buffer-name)))
(let ((index (make-temp-file "index"))
(buffer (current-buffer)))
+ (when magit-wip-before-change-mode
+ (magit-wip-commit-before-change (list file) " before un-/stage"))
(with-temp-file index
(insert-buffer-substring buffer))
(magit-call-git "update-index" "--cacheinfo"
@@ -1063,7 +1065,9 @@ is done using `magit-find-index-noselect'."
(concat "--path=" file)
"--" index)
file)
- (set-buffer-modified-p nil))
+ (set-buffer-modified-p nil)
+ (when magit-wip-after-apply-mode
+ (magit-wip-commit-after-apply (list file) " after un-/stage")))
(message "Abort")))
(--when-let (magit-mode-get-buffer
magit-status-buffer-name-format 'magit-status-mode)