From 7d3a07bc6fdfae579681d8e71685d94b7bfa9ad3 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Tue, 11 Oct 2022 21:11:20 +0200 Subject: [PATCH 1/2] * lisp/vc/vc-git.el (vc-git--rev-parse): Abbreviate commits --- lisp/vc/vc-git.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index ea06ccaf87..3822bb8574 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -1677,8 +1677,10 @@ vc-git-previous-revision (defun vc-git--rev-parse (rev) (with-temp-buffer (and - (vc-git--out-ok "rev-parse" rev) - (buffer-substring-no-properties (point-min) (+ (point-min) 40))))) + (vc-git--out-ok "rev-parse" "--short" rev) + (string-trim-right + (buffer-substring-no-properties (point-min) (min (+ (point-min) 40) + (point-max))))))) (defun vc-git-next-revision (file rev) "Git-specific version of `vc-next-revision'." -- 2.37.3