aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Kaludercic2022-11-06 22:18:24 +0100
committerPhilip Kaludercic2022-11-06 22:50:59 +0100
commit8fe62b2ab571ba313587e8543006eca03ff36025 (patch)
treeb30fde2fbe3ffa7e66d52a9b1e4b6b7a36d0d0cf
parent4103b6c4079e94550e0e8434e21ad8504b9e3a7c (diff)
downloademacs-8fe62b2ab571ba313587e8543006eca03ff36025.tar.gz
emacs-8fe62b2ab571ba313587e8543006eca03ff36025.zip
Revert "* lisp/vc/vc-git.el (vc-git--rev-parse): Allow abbreviating commits"
This reverts commit 307ad210040251ea0de2e7f453350c4497bda874.
-rw-r--r--lisp/vc/vc-git.el15
1 files changed, 5 insertions, 10 deletions
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'."
373 373
374(defun vc-git-working-revision (_file) 374(defun vc-git-working-revision (_file)
375 "Git-specific version of `vc-working-revision'." 375 "Git-specific version of `vc-working-revision'."
376 (let* ((process-file-side-effects nil) 376 (let (process-file-side-effects)
377 (commit (vc-git--rev-parse "HEAD" t))) 377 (vc-git--rev-parse "HEAD")))
378 (or (vc-git-symbolic-commit commit) commit)))
379 378
380(defun vc-git--symbolic-ref (file) 379(defun vc-git--symbolic-ref (file)
381 (or 380 (or
@@ -1694,15 +1693,11 @@ This requires git 1.8.4 or later, for the \"-L\" option of \"git log\"."
1694 ;; does not (and cannot) quote. 1693 ;; does not (and cannot) quote.
1695 (vc-git--rev-parse (concat rev "~1")))) 1694 (vc-git--rev-parse (concat rev "~1"))))
1696 1695
1697(defun vc-git--rev-parse (rev &optional short) 1696(defun vc-git--rev-parse (rev)
1698 (with-temp-buffer 1697 (with-temp-buffer
1699 (and 1698 (and
1700 (if short 1699 (vc-git--out-ok "rev-parse" rev)
1701 (vc-git--out-ok "rev-parse" "--short" rev) 1700 (buffer-substring-no-properties (point-min) (+ (point-min) 40)))))
1702 (vc-git--out-ok "rev-parse" rev))
1703 (string-trim-right
1704 (buffer-substring-no-properties (point-min) (min (+ (point-min) 40)
1705 (point-max)))))))
1706 1701
1707(defun vc-git-next-revision (file rev) 1702(defun vc-git-next-revision (file rev)
1708 "Git-specific version of `vc-next-revision'." 1703 "Git-specific version of `vc-next-revision'."