branch: elpa/magit
commit 4d8642e407b646964e97d28ebd4adc1d566fb810
Author: Jonas Bernoulli <jo...@bernoul.li>
Commit: Jonas Bernoulli <jo...@bernoul.li>

    magit-refs--format-margin: Handle tags referring to non-commits
    
    If a tag refers to a non-commit objects, then our `magit-ref-format'
    call returns nil.  Use a blank margin overlay in that case, previously
    we signaled an error.
---
 lisp/magit-refs.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/magit-refs.el b/lisp/magit-refs.el
index 62a8fc52b9..e5132d726c 100644
--- a/lisp/magit-refs.el
+++ b/lisp/magit-refs.el
@@ -807,8 +807,9 @@ line is inserted at all."
 (defun magit-refs--format-margin (commit)
   (save-excursion
     (goto-char (line-beginning-position 0))
-    (let ((line (magit-rev-format "%cN%x00%ct" commit)))
-      (apply #'magit-log-format-margin commit (split-string line "\0")))))
+    (if-let ((line (magit-rev-format "%cN%x00%ct" commit)))
+        (apply #'magit-log-format-margin commit (split-string line "\0"))
+      (magit-make-margin-overlay))))
 
 ;;; _
 (provide 'magit-refs)

Reply via email to