Make 'sure' that taking a snapshot does not revert buffers wrongly.

* magit.el (magit-stash-snapshot): Wrap calls to magit-run in one
magit-with-refresh so that magit-revert-files is only called once.
Calling it twice within one second does not work.
This commit is contained in:
Marius Vollmer 2009-02-15 20:00:35 +02:00
parent c6f796de04
commit 2913ea0220

View file

@ -2341,10 +2341,11 @@ Prefix arg means justify as well."
(defun magit-stash-snapshot ()
(interactive)
(magit-run-git "stash" "save"
(format-time-string "Snapshot taken at %Y-%m-%d %H:%M:%S"
(current-time)))
(magit-run-git "stash" "apply" "stash@{0}"))
(magit-with-refresh
(magit-run-git "stash" "save"
(format-time-string "Snapshot taken at %Y-%m-%d %H:%M:%S"
(current-time)))
(magit-run-git "stash" "apply" "stash@{0}")))
(defvar magit-currently-shown-stash nil)