[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/git-commit 84eaa203f3: Use seq-keep instead of delq and ma
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/git-commit 84eaa203f3: Use seq-keep instead of delq and mapcar |
Date: |
Thu, 21 Sep 2023 19:00:32 -0400 (EDT) |
branch: elpa/git-commit
commit 84eaa203f3c70d55f29fbe6a8d6d9d5334cb6818
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
Use seq-keep instead of delq and mapcar
---
default.mk | 2 +-
lisp/magit-git.el | 31 +++++++++++++++----------------
lisp/magit-pkg.el | 2 +-
lisp/magit-refs.el | 14 +++++++-------
lisp/magit-submodule.el | 38 +++++++++++++++++---------------------
lisp/magit.el | 2 +-
6 files changed, 42 insertions(+), 47 deletions(-)
diff --git a/default.mk b/default.mk
index 52f04c69e6..1faae1ad5e 100644
--- a/default.mk
+++ b/default.mk
@@ -121,7 +121,7 @@ LIBGIT_VERSION = 0
MAGIT_VERSION = $(VERSION)
MAGIT_LIBGIT_VERSION = $(VERSION)
MAGIT_SECTION_VERSION = $(VERSION)
-SEQ_VERSION = 2.23
+SEQ_VERSION = 2.24
TRANSIENT_VERSION = 0.3.6
WITH_EDITOR_VERSION = 3.0.5
diff --git a/lisp/magit-git.el b/lisp/magit-git.el
index c372de229b..1d3bb22952 100644
--- a/lisp/magit-git.el
+++ b/lisp/magit-git.el
@@ -2364,22 +2364,21 @@ and this option only controls what face is used.")
(magit-branch-remote (push name remotes))
(t (push name other)))))
(setq remotes
- (delq nil
- (mapcar
- (lambda (name)
- (if (string-match "\\`\\([^/]*\\)/\\(.*\\)\\'" name)
- (let ((r (match-string 1 name))
- (b (match-string 2 name)))
- (and (not (equal b "HEAD"))
- (if (equal (concat "refs/remotes/" name)
- (magit-git-string
- "symbolic-ref"
- (format "refs/remotes/%s/HEAD"
r)))
- (magit--propertize-face
- name 'magit-branch-remote-head)
- name)))
- name))
- remotes)))
+ (seq-keep
+ (lambda (name)
+ (if (string-match "\\`\\([^/]*\\)/\\(.*\\)\\'" name)
+ (let ((r (match-string 1 name))
+ (b (match-string 2 name)))
+ (and (not (equal b "HEAD"))
+ (if (equal (concat "refs/remotes/" name)
+ (magit-git-string
+ "symbolic-ref"
+ (format "refs/remotes/%s/HEAD" r)))
+ (magit--propertize-face
+ name 'magit-branch-remote-head)
+ name)))
+ name))
+ remotes))
(let* ((current (magit-get-current-branch))
(target (magit-get-upstream-branch current)))
(dolist (name branches)
diff --git a/lisp/magit-pkg.el b/lisp/magit-pkg.el
index 9e9c924ac5..3d6747b865 100644
--- a/lisp/magit-pkg.el
+++ b/lisp/magit-pkg.el
@@ -5,7 +5,7 @@
(dash "20221013")
(git-commit "20230101")
(magit-section "20230101")
- (seq "2.23")
+ (seq "2.24")
(transient "20230201")
(with-editor "20230118"))
:homepage "https://magit.vc"
diff --git a/lisp/magit-refs.el b/lisp/magit-refs.el
index d942b17f92..a097afe082 100644
--- a/lisp/magit-refs.el
+++ b/lisp/magit-refs.el
@@ -623,17 +623,17 @@ line is inserted at all."
(magit-make-margin-overlay nil t)))
(defun magit-refs--format-local-branches ()
- (let ((lines (delq nil (mapcar #'magit-refs--format-local-branch
- (magit-git-lines
- "for-each-ref"
- (concat "--format=\
+ (let ((lines (seq-keep #'magit-refs--format-local-branch
+ (magit-git-lines
+ "for-each-ref"
+ (concat "--format=\
%(HEAD)%00%(refname:short)%00%(refname)%00\
%(upstream:short)%00%(upstream)%00%(upstream:track)%00"
- (if magit-refs-show-push-remote "\
+ (if magit-refs-show-push-remote "\
%(push:remotename)%00%(push)%00%(push:track)%00%(subject)"
"%00%00%00%(subject)"))
- "refs/heads"
- magit-buffer-arguments)))))
+ "refs/heads"
+ magit-buffer-arguments))))
(unless (magit-get-current-branch)
(push (magit-refs--format-local-branch
(concat "*\0\0\0\0\0\0\0\0" (magit-rev-format "%s")))
diff --git a/lisp/magit-submodule.el b/lisp/magit-submodule.el
index c2b55edfce..a311247a64 100644
--- a/lisp/magit-submodule.el
+++ b/lisp/magit-submodule.el
@@ -659,27 +659,23 @@ These sections can be expanded to show the respective
commits."
(defun magit-submodule-list-refresh ()
(setq tabulated-list-entries
- ;; Backport version 2.23 of seq lacks seq-keep. Once that is
- ;; available trace this commment to find more instances where
- ;; it should be used.
- (delq nil
- (mapcar
- (lambda (module)
- (let ((default-directory
- (expand-file-name (file-name-as-directory module))))
- (and (file-exists-p ".git")
- (or (not magit-submodule-list-predicate)
- (funcall magit-submodule-list-predicate module))
- (list module
- (vconcat
- (mapcar (pcase-lambda (`(,title ,width ,fn
,props))
- (or (funcall fn `((:path ,module)
- (:title ,title)
- (:width ,width)
- ,@props))
- ""))
- magit-repolist-columns))))))
- (magit-list-module-paths))))
+ (seq-keep
+ (lambda (module)
+ (let ((default-directory
+ (expand-file-name (file-name-as-directory module))))
+ (and (file-exists-p ".git")
+ (or (not magit-submodule-list-predicate)
+ (funcall magit-submodule-list-predicate module))
+ (list module
+ (vconcat
+ (mapcar (pcase-lambda (`(,title ,width ,fn ,props))
+ (or (funcall fn `((:path ,module)
+ (:title ,title)
+ (:width ,width)
+ ,@props))
+ ""))
+ magit-repolist-columns))))))
+ (magit-list-module-paths)))
(message "Listing submodules...")
(tabulated-list-init-header)
(tabulated-list-print t)
diff --git a/lisp/magit.el b/lisp/magit.el
index 97e6b5f6df..ebbeca7511 100644
--- a/lisp/magit.el
+++ b/lisp/magit.el
@@ -24,7 +24,7 @@
;; (dash "2.19.1")
;; (git-commit "3.3.0")
;; (magit-section "3.3.0")
-;; (seq "2.23")
+;; (seq "2.24")
;; (transient "0.3.6")
;; (with-editor "3.0.5"))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/git-commit 84eaa203f3: Use seq-keep instead of delq and mapcar,
ELPA Syncer <=