Revert "* lisp/vc/vc-git.el (vc-git--rev-parse): Allow abbreviating commits"

This reverts commit 307ad21004.
This commit is contained in:
Philip Kaludercic 2022-11-06 22:18:24 +01:00
parent 4103b6c407
commit 8fe62b2ab5

View file

@ -373,9 +373,8 @@ in the order given by `git status'."
(defun vc-git-working-revision (_file)
"Git-specific version of `vc-working-revision'."
(let* ((process-file-side-effects nil)
(commit (vc-git--rev-parse "HEAD" t)))
(or (vc-git-symbolic-commit commit) commit)))
(let (process-file-side-effects)
(vc-git--rev-parse "HEAD")))
(defun vc-git--symbolic-ref (file)
(or
@ -1694,15 +1693,11 @@ This requires git 1.8.4 or later, for the \"-L\" option of \"git log\"."
;; does not (and cannot) quote.
(vc-git--rev-parse (concat rev "~1"))))
(defun vc-git--rev-parse (rev &optional short)
(defun vc-git--rev-parse (rev)
(with-temp-buffer
(and
(if short
(vc-git--out-ok "rev-parse" "--short" rev)
(vc-git--out-ok "rev-parse" rev))
(string-trim-right
(buffer-substring-no-properties (point-min) (min (+ (point-min) 40)
(point-max)))))))
(vc-git--out-ok "rev-parse" rev)
(buffer-substring-no-properties (point-min) (+ (point-min) 40)))))
(defun vc-git-next-revision (file rev)
"Git-specific version of `vc-next-revision'."