Function: diff-hl-resolved-revision
diff-hl-resolved-revision is a natively compiled function defined in
diff-hl.el.
Signature
(diff-hl-resolved-revision BACKEND REVISION)
Source Code
;; Defined in /nix/store/cfz56rl3lp066226i0bmmgiicls3gcq7-emacs-packages-deps/share/emacs/site-lisp/elpa/diff-hl-20261001.135/diff-hl.el
(defun diff-hl-resolved-revision (backend revision)
(cond
((eq backend 'Git)
(vc-git--rev-parse revision))
((eq backend 'Hg)
(with-temp-buffer
(vc-hg-command (current-buffer) 0 nil
"identify" "-r" revision "-i")
(goto-char (point-min))
(buffer-substring-no-properties (point) (line-end-position))))
((eq backend 'Bzr)
(with-temp-buffer
(vc-bzr-command (current-buffer) 0 nil
"log" "--log-format=template"
"--template-str='{revno}'"
"-r" revision)
(goto-char (point-min))
(buffer-substring-no-properties (point) (line-end-position))))
((eq backend 'JJ)
(car (last (vc-jj--process-lines nil
"log" "--no-graph"
"-r" revision
"-T" "commit_id" "-n" "1"))))
(t
revision)))