From: Philip Kaludercic Date: Sun, 6 Nov 2022 21:18:24 +0000 (+0100) Subject: Revert "* lisp/vc/vc-git.el (vc-git--rev-parse): Allow abbreviating commits" X-Git-Tag: emacs-29.0.90~1616^2~254 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8fe62b2ab571ba313587e8543006eca03ff36025;p=emacs.git Revert "* lisp/vc/vc-git.el (vc-git--rev-parse): Allow abbreviating commits" This reverts commit 307ad210040251ea0de2e7f453350c4497bda874. --- diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 376892c7206..74536309e29 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -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'."