From e2f443df17710c74fa6a2e51dd061f7e898d48e6 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Thu, 18 Jun 2020 01:09:29 +0300 Subject: [PATCH] vc-git-dir-extra-headers: Fix recent breakage * lisp/vc/vc-git.el (vc-git-dir-extra-headers): Account for 'remote' being set to "" when not found (https://lists.gnu.org/archive/html/emacs-devel/2020-06/msg00582.html). (vc-git-dir-extra-headers): Check the value of remote-url instead. --- lisp/vc/vc-git.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 96ee59db8e6..1cd2a7bb133 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -747,7 +747,7 @@ or an empty string if none." (concat "branch." branch ".remote"))))) (when (string-match "\\([^\n]+\\)" remote) (setq remote (match-string 1 remote))) - (when remote + (when (> (length remote) 0) (setq remote-url (vc-git-repository-url dir remote)))) (setq branch "not (detached HEAD)")) (when stash-list @@ -803,7 +803,7 @@ or an empty string if none." (propertize "Branch : " 'face 'font-lock-type-face) (propertize branch 'face 'font-lock-variable-name-face) - (when remote + (when remote-url (concat "\n" (propertize "Remote : " 'face 'font-lock-type-face) -- 2.39.5