branch: elpa/magit
commit 692cc5e7696f9de6fce4a2e076eb51507809aaf3
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
magit-list-special-refnames: Fix broken function
Previously it returned a list of `t's instead of special refnames.
Closes #5277.
---
CHANGELOG | 2 ++
lisp/magit-git.el | 5 +++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG b/CHANGELOG
index d16768a73db..635f5dfb12e 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -25,6 +25,8 @@ Bug fixes:
- In logs, no longer strip ~heads/~ prefix from branch names if a tag
with the same name exists.
+- ~magit-list-special-refnames~ returned nonsense. #5277
+
* v4.1.3 2024-12-06
- For most important sections, if an error occurs while inserting the
diff --git a/lisp/magit-git.el b/lisp/magit-git.el
index c7e64d4f42e..356f42a7c63 100644
--- a/lisp/magit-git.el
+++ b/lisp/magit-git.el
@@ -1981,8 +1981,9 @@ SORTBY is a key or list of keys to pass to the `--sort'
flag of
(defun magit-list-special-refnames ()
(let ((gitdir (magit-gitdir)))
- (seq-keep (lambda (name) (file-exists-p (expand-file-name name gitdir)))
- magit-special-refnames)))
+ (cl-remove-if-not (lambda (name)
+ (file-exists-p (expand-file-name name gitdir)))
+ magit-special-refnames)))
(defun magit-list-branch-names ()
(magit-list-refnames (list "refs/heads" "refs/remotes")))