Function: magit-commit-oid
magit-commit-oid is a natively compiled function defined in
magit-git.el.
Signature
(magit-commit-oid REV &optional NOERROR)
Documentation
Return commit oid for REV if it can be dereferences as a commit.
Otherwise signal an error, or return nil, if optional NOERROR is non-nil.
Source Code
;; Defined in /nix/store/irvbdy0zra0dn8fpd008f32x5ix6qm5v-emacs-packages-deps/share/emacs/site-lisp/elpa/magit-20261005.508/magit-git.el
(defun magit-commit-oid (rev &optional noerror)
"Return commit oid for REV if it can be dereferences as a commit.
Otherwise signal an error, or return nil, if optional NOERROR is non-nil."
(cond ((magit-rev-verify (magit--rev-dereference rev)))
(noerror nil)
((error "%s cannot be dereferenced as a commit" rev))))