Commit f4b8fee6 authored by Jonas Bernoulli's avatar Jonas Bernoulli

magit-insert-revision-gravatars: Allow inserting only one of them

The documentation already claimed that was possible, but trying to do
so would actually have resulted in an error.  Not that I expect that
anyone would want to do this--but lets behave as documented anyway.
parent 26cda52a
......@@ -2189,9 +2189,9 @@ or a ref which is not a branch, then it inserts nothing."
(require 'gravatar)
(pcase-let ((`(,author . ,committer) magit-revision-show-gravatars))
(--when-let (magit-rev-format "%aE" rev)
(--when-let (and author (magit-rev-format "%aE" rev))
(magit-insert-revision-gravatar beg rev it author))
(--when-let (magit-rev-format "%cE" rev)
(--when-let (and committer (magit-rev-format "%cE" rev))
(magit-insert-revision-gravatar beg rev it committer)))))
(defun magit-insert-revision-gravatar (beg rev email regexp)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment