branch: elpa/magit
commit 2b538323ec786320e61ebc0d203cf95dcff4624a
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>

    magit-blob-ancestor: Cosmetics
---
 lisp/magit-files.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/lisp/magit-files.el b/lisp/magit-files.el
index d7920bf9571..22ae6831224 100644
--- a/lisp/magit-files.el
+++ b/lisp/magit-files.el
@@ -422,10 +422,11 @@ the same location in the respective file in the working 
tree."
              (magit--age (magit-rev-format "%ct" rev))))))
 
 (defun magit-blob-ancestor (rev file)
-  (let ((lines (magit-with-toplevel
-                 (magit-git-lines "log" "-2" "--format=%H" "--name-only"
-                                  "--follow" (or rev "HEAD") "--" file))))
-    (if rev (cddr lines) (butlast lines 2))))
+  (nth (if rev 1 0)
+       (seq-partition (magit-with-toplevel
+                        (magit-git-lines "log" "-2" "--format=%H" "--name-only"
+                                         "--follow" (or rev "HEAD") "--" file))
+                      2)))
 
 (defun magit-blob-successor (rev file)
   (let ((lines (magit-with-toplevel

Reply via email to