Function: vc-git-cherry-pick-comment
vc-git-cherry-pick-comment is a byte-compiled function defined in
vc-git.el.gz.
Signature
(vc-git-cherry-pick-comment FILES REV REVERSE)
Source Code
;; Defined in /usr/src/emacs/lisp/vc/vc-git.el.gz
(defun vc-git-cherry-pick-comment (_files rev reverse)
;; Don't just call `vc-git-get-change-comment' in order to make one
;; fewer call out to Git. We have to resolve REV because even if it's
;; already a hash it may be an abbreviated one.
(let (comment)
(with-temp-buffer
(vc-git-command t 0 nil "log" "-n1" "--pretty=format:%H%n%B" rev)
(goto-char (point-min))
(setq rev (buffer-substring-no-properties (point) (pos-eol)))
(forward-line 1)
(setq comment (buffer-substring-no-properties (point) (point-max))))
(if reverse
(format "Summary: Revert \"%s\"\n\nThis reverts commit %s.\n"
(car (split-string comment "\n" t
split-string-default-separators))
rev)
(format "Summary: %s\n(cherry picked from commit %s)\n"
comment rev))))