[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/git-commit ddeaa2d69a: magit-repository-local-delete: Supp
|
From: |
ELPA Syncer |
|
Subject: |
[nongnu] elpa/git-commit ddeaa2d69a: magit-repository-local-delete: Support acting on all repositories |
|
Date: |
Fri, 12 Jan 2024 19:04:16 -0500 (EST) |
branch: elpa/git-commit
commit ddeaa2d69aac4c89e95ab60cf216c4c389db1a02
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
magit-repository-local-delete: Support acting on all repositories
---
lisp/magit-mode.el | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/lisp/magit-mode.el b/lisp/magit-mode.el
index 0f8152690a..11d93cab0c 100644
--- a/lisp/magit-mode.el
+++ b/lisp/magit-mode.el
@@ -1348,11 +1348,16 @@ Unless specified, REPOSITORY is the current buffer's
repository."
(defun magit-repository-local-delete (key &optional repository)
"Delete the repository-local value for KEY.
-Unless specified, REPOSITORY is the current buffer's repository."
- (when-let ((cache (assoc (or repository
- (magit-repository-local-repository))
- magit-repository-local-cache)))
- (setf cache (compat-call assoc-delete-all key cache))))
+Unless specified, REPOSITORY is the current buffer's repository.
+If REPOSITORY is `all', then delete the value for KEY for all
+repositories."
+ (if (eq repository 'all)
+ (dolist (cache magit-repository-local-cache)
+ (setf cache (compat-call assoc-delete-all key cache)))
+ (when-let ((cache (assoc (or repository
+ (magit-repository-local-repository))
+ magit-repository-local-cache)))
+ (setf cache (compat-call assoc-delete-all key cache)))))
(defmacro magit--with-repository-local-cache (key &rest body)
(declare (indent 1) (debug (form body)))
| [Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/git-commit ddeaa2d69a: magit-repository-local-delete: Support acting on all repositories,
ELPA Syncer <=