magit-refresh-all: run magit-{pre,post}-refresh-hook
Jonas Bernoulli
8 years ago
38 | 38 |
Setting the new option `magit-unstage-committed' to nil, disables
|
39 | 39 |
this behavior. Attempting to unstage a committed change would then
|
40 | 40 |
result in an error again.
|
|
41 |
|
|
42 |
* Like `magit-refresh' already did, `magit-refresh-all' now runs the
|
|
43 |
hooks `magit-pre-refresh-hook' and `magit-post-refresh-hook'.
|
41 | 44 |
|
42 | 45 |
* The heading of the section which lists commits that exist in the
|
43 | 46 |
current branch but not in its upstream was changed from "Unpushed
|
684 | 684 |
"Refresh some buffers belonging to the current repository.
|
685 | 685 |
|
686 | 686 |
Refresh the current buffer if its major mode derives from
|
687 | |
`magit-mode', and refresh the corresponding status buffer."
|
|
687 |
`magit-mode', and refresh the corresponding status buffer.
|
|
688 |
|
|
689 |
Run hooks `magit-pre-refresh-hook' and `magit-post-refresh-hook'."
|
688 | 690 |
(interactive)
|
689 | 691 |
(unless inhibit-magit-refresh
|
690 | 692 |
(magit-run-hook-with-benchmark 'magit-pre-refresh-hook)
|
|
701 | 703 |
(defun magit-refresh-all ()
|
702 | 704 |
"Refresh all buffers belonging to the current repository.
|
703 | 705 |
|
704 | |
Refresh all Magit buffers belonging to the current repository.
|
705 | |
|
706 | |
Also always revert all unmodified buffers that visit files being
|
707 | |
tracked in the current repository."
|
|
706 |
Refresh all Magit buffers belonging to the current repository,
|
|
707 |
and revert buffers that visit files located inside the current
|
|
708 |
repository.
|
|
709 |
|
|
710 |
Run hooks `magit-pre-refresh-hook' and `magit-post-refresh-hook'."
|
708 | 711 |
(interactive)
|
|
712 |
(magit-run-hook-with-benchmark 'magit-pre-refresh-hook)
|
709 | 713 |
(dolist (buffer (magit-mode-get-buffers))
|
710 | 714 |
(with-current-buffer buffer (magit-refresh-buffer)))
|
711 | |
(magit-auto-revert-buffers))
|
|
715 |
(magit-auto-revert-buffers)
|
|
716 |
(magit-run-hook-with-benchmark 'magit-post-refresh-hook))
|
712 | 717 |
|
713 | 718 |
(defvar-local magit-refresh-start-time nil)
|
714 | 719 |
|