[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/git-commit 4d59e1cafd 5/9: magit-zap-caches: Also zap magi
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/git-commit 4d59e1cafd 5/9: magit-zap-caches: Also zap magit--remotes-using-recent-git |
Date: |
Tue, 22 Feb 2022 05:58:10 -0500 (EST) |
branch: elpa/git-commit
commit 4d59e1cafdc3b45033bc6dcd5f2f713ba01a676a
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
magit-zap-caches: Also zap magit--remotes-using-recent-git
---
lisp/magit-git.el | 4 ++++
lisp/magit-mode.el | 13 +++++++++----
lisp/magit-status.el | 2 --
3 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/lisp/magit-git.el b/lisp/magit-git.el
index d72b854d5e..05df0a35b5 100644
--- a/lisp/magit-git.el
+++ b/lisp/magit-git.el
@@ -574,6 +574,10 @@ call function WASHER with ARGS as its sole argument."
(magit-cancel-section))
(magit-maybe-make-margin-overlay))))
+;;; Git Version
+
+(defvar magit--remotes-using-recent-git nil)
+
(defun magit-git-version (&optional raw)
"Return the installed Git version."
(--when-let (let (magit-git-global-arguments)
diff --git a/lisp/magit-mode.el b/lisp/magit-mode.el
index 5d8764c59a..12cf4bb3b8 100644
--- a/lisp/magit-mode.el
+++ b/lisp/magit-mode.el
@@ -1424,15 +1424,17 @@ Unless specified, REPOSITORY is the current buffer's
repository."
(defun magit-zap-caches (&optional all)
"Zap caches for the current repository.
-Remove the repository's entry from `magit-repository-local-cache'
-and set `magit-section-visibility-cache' to nil in all of the
-repository's Magit buffers.
+Remove the repository's entry from `magit-repository-local-cache',
+remove the host's entry from `magit--remotes-using-recent-git', set
+`magit-section-visibility-cache' to nil for all Magit buffers of
+the repository and set `magit--libgit-available-p' to `unknown'.
With a prefix argument or if optional ALL is non-nil, discard the
mentioned caches completely."
(interactive)
(cond (all
(setq magit-repository-local-cache nil)
+ (setq magit--remotes-using-recent-git nil)
(dolist (buffer (buffer-list))
(with-current-buffer buffer
(when (derived-mode-p 'magit-mode)
@@ -1442,7 +1444,10 @@ mentioned caches completely."
(setq magit-repository-local-cache
(cl-delete default-directory
magit-repository-local-cache
- :key #'car :test #'equal)))
+ :key #'car :test #'equal))
+ (setq magit--remotes-using-recent-git
+ (delete (file-remote-p default-directory)
+ magit--remotes-using-recent-git)))
(dolist (buffer (magit-mode-get-buffers))
(with-current-buffer buffer
(setq magit-section-visibility-cache nil)))))
diff --git a/lisp/magit-status.el b/lisp/magit-status.el
index 07815f1d3f..589207166d 100644
--- a/lisp/magit-status.el
+++ b/lisp/magit-status.el
@@ -333,8 +333,6 @@ init file: (global-set-key (kbd \"C-x g\")
'magit-status-quick)."
(magit-display-buffer buffer)
(call-interactively #'magit-status)))
-(defvar magit--remotes-using-recent-git nil)
-
(defun magit--tramp-asserts (directory)
(when-let ((remote (file-remote-p directory)))
(unless (member remote magit--remotes-using-recent-git)
- [nongnu] elpa/git-commit updated (68be0584f4 -> 9b94654921), ELPA Syncer, 2022/02/22
- [nongnu] elpa/git-commit 4d59e1cafd 5/9: magit-zap-caches: Also zap magit--remotes-using-recent-git,
ELPA Syncer <=
- [nongnu] elpa/git-commit 8394f0d4ea 8/9: Refactor git version asserts, ELPA Syncer, 2022/02/22
- [nongnu] elpa/git-commit 477603835b 6/9: magit-debug-git-executable: Move definition to magit-git.el, ELPA Syncer, 2022/02/22
- [nongnu] elpa/git-commit 69be963b62 2/9: magit-startup-asserts: Remove special case for Travis, ELPA Syncer, 2022/02/22
- [nongnu] elpa/git-commit 489f84a3d6 7/9: magit--safe-git-version: New function, ELPA Syncer, 2022/02/22
- [nongnu] elpa/git-commit 6c4ff54a08 3/9: magit-startup-asserts: Don't check Git version when building Magit, ELPA Syncer, 2022/02/22
- [nongnu] elpa/git-commit 9b94654921 9/9: Remove redundant version/feature caches, ELPA Syncer, 2022/02/22
- [nongnu] elpa/git-commit 18728adc76 4/9: magit-zap-caches: With a prefix discard complete caches, ELPA Syncer, 2022/02/22
- [nongnu] elpa/git-commit d5ed87b138 1/9: magit-margin-default-time-format: New un-advertised variable, ELPA Syncer, 2022/02/22