diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2025-05-15 15:47:54 +0200 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2025-05-15 15:47:54 +0200 |
| commit | 4d8642e407b646964e97d28ebd4adc1d566fb810 (patch) | |
| tree | 9a0ee3c79b0dfb6085f6c52c69025c17b274a2c9 /lisp | |
| parent | 716b9e64374cdd9b0551c4befd3691d8daee4b20 (diff) | |
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.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/magit-refs.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/magit-refs.el b/lisp/magit-refs.el index 62a8fc5..e5132d7 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) |
