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:
parent
c6f796de04
commit
2913ea0220
1 changed files with 5 additions and 4 deletions
9
magit.el
9
magit.el
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue