summaryrefslogtreecommitdiff
path: root/lisp/vc/vc-git.el
diff options
context:
space:
mode:
authorDmitry Gutov <dgutov@yandex.ru>2020-06-18 01:09:29 +0300
committerDmitry Gutov <dgutov@yandex.ru>2020-06-18 01:09:49 +0300
commite2f443df17710c74fa6a2e51dd061f7e898d48e6 (patch)
tree966d5b8f41990e9d8184a705bd8a20800c982d6b /lisp/vc/vc-git.el
parent5502eedf90d0da27df0c6c1fa33389d849d59a80 (diff)
downloademacs-e2f443df17710c74fa6a2e51dd061f7e898d48e6.tar.gz
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.
Diffstat (limited to 'lisp/vc/vc-git.el')
-rw-r--r--lisp/vc/vc-git.el4
1 files 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)