[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/magit ed4fa09eee 7/7: magit-insert-head-branch-header: Red
From: |
Jonas Bernoulli |
Subject: |
[nongnu] elpa/magit ed4fa09eee 7/7: magit-insert-head-branch-header: Reduce scope of a let-binding |
Date: |
Wed, 12 Mar 2025 10:46:07 -0400 (EDT) |
branch: elpa/magit
commit ed4fa09eeeb531c0cfc3c7bf713d3929c2b2107d
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
magit-insert-head-branch-header: Reduce scope of a let-binding
Closes #5333.
---
lisp/magit-status.el | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/lisp/magit-status.el b/lisp/magit-status.el
index 2b90b21d89..984e907d6e 100644
--- a/lisp/magit-status.el
+++ b/lisp/magit-status.el
@@ -568,13 +568,12 @@ the status buffer causes this section to disappear again."
"Insert a header line about the current branch.
If `HEAD' is detached, then insert information about that commit
instead. The optional BRANCH argument is for internal use only."
- (let ((branch (or branch (magit-get-current-branch)))
- (output (magit-rev-format "%h %s" (or branch "HEAD"))))
+ (let ((output (magit-rev-format "%h %s" (or branch "HEAD"))))
(string-match "^\\([^ ]+\\) \\(.*\\)" output)
(magit-bind-match-strings (commit summary) output
(when (equal summary "")
(setq summary "(no commit message)"))
- (if branch
+ (if-let ((branch (or branch (magit-get-current-branch))))
(magit-insert-section (branch branch)
(insert (format "%-10s" "Head: "))
(when magit-status-show-hashes-in-headers
- [nongnu] elpa/magit updated (28d272ce0b -> ed4fa09eee), Jonas Bernoulli, 2025/03/12
- [nongnu] elpa/magit 3f79700f1b 5/7: magit-insert-section--finish: Always add heading keymap, Jonas Bernoulli, 2025/03/12
- [nongnu] elpa/magit 80cae1a26f 6/7: git-commit-major-mode: Explicitly support log-edit-mode, Jonas Bernoulli, 2025/03/12
- [nongnu] elpa/magit 6ce1ece580 4/7: magit-insert-section--finish: Fix adding heading keymap, Jonas Bernoulli, 2025/03/12
- [nongnu] elpa/magit 225ea6fd00 2/7: magit-wip-*-mode-lighter: Remove legacy options, Jonas Bernoulli, 2025/03/12
- [nongnu] elpa/magit ed4fa09eee 7/7: magit-insert-head-branch-header: Reduce scope of a let-binding,
Jonas Bernoulli <=
- [nongnu] elpa/magit f6f25e6566 3/7: magit-insert-section-body: Set section properties on delayed insertion, Jonas Bernoulli, 2025/03/12
- [nongnu] elpa/magit c0a8e694b9 1/7: magit-after-save-refresh-buffers: Respect magit-inhibit-refresh, Jonas Bernoulli, 2025/03/12