emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/git-commit 5d3fa4e96f 1/3: magit-log-merged: Improve recen


From: ELPA Syncer
Subject: [nongnu] elpa/git-commit 5d3fa4e96f 1/3: magit-log-merged: Improve recent fix
Date: Fri, 27 May 2022 06:58:24 -0400 (EDT)

branch: elpa/git-commit
commit 5d3fa4e96f1eacc0943c2f98c1fc95fb61c672da
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    magit-log-merged: Improve recent fix
    
    Improve the fix in [1: 2dbce24a6f] by reverting the damage done in
    [2: a20dc0b83e] instead.  Add a comment to keep me from messing it
    up again.
    
    1: 2022-05-27 2dbce24a6f6ab081e9f9579812460b5bbcc61211
       magit-log-merged: Fix for commits made directly on branch
    
    2: 2022-04-22 a20dc0b83e458c4f2d5e5c7f4038f27af3794014
       Use string-trim
---
 lisp/magit-log.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/magit-log.el b/lisp/magit-log.el
index 8e4002c080..eaa77581c5 100644
--- a/lisp/magit-log.el
+++ b/lisp/magit-log.el
@@ -834,8 +834,10 @@ https://github.com/mhagger/git-when-merged.";
                        (magit-git-string "merge-base" (concat m "^") commit)
                        m))
          args files nil commit)
-      (setq m (string-trim m))
-      (if (string-suffix-p "Commit is directly on this branch." m)
+      ;; Output: "<ref><lots of spaces><message>".
+      ;; This is not the same as `string-trim'.
+      (setq m (string-trim-left (substring m (string-match " " m))))
+      (if (equal m "Commit is directly on this branch.")
           (let* ((from (concat commit "~10"))
                  (to (- (car (magit-rev-diff-count branch commit)) 10))
                  (to (if (<= to 0)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]