From 8bb9fbfdb39d1fd17430f24e9572bf4dde830758 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Tue, 11 Oct 2022 21:14:48 +0200 Subject: [PATCH 2/2] Return symbolic commit for the working revision if possible * lisp/vc/vc-git.el (vc-git-working-revision): Attempt to use 'vc-git-symbolic-commit'. --- lisp/vc/vc-git.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 3822bb8574..d17c02852c 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -373,8 +373,9 @@ vc-git-state (defun vc-git-working-revision (_file) "Git-specific version of `vc-working-revision'." - (let (process-file-side-effects) - (vc-git--rev-parse "HEAD"))) + (let* ((process-file-side-effects nil) + (commit (vc-git--rev-parse "HEAD"))) + (or (vc-git-symbolic-commit commit) commit))) (defun vc-git--symbolic-ref (file) (or -- 2.37.3