]> git.eshelyaron.com Git - emacs.git/commitdiff
vc-git-dir-extra-headers: Fix recent breakage
authorDmitry Gutov <dgutov@yandex.ru>
Wed, 17 Jun 2020 22:09:29 +0000 (01:09 +0300)
committerDmitry Gutov <dgutov@yandex.ru>
Wed, 17 Jun 2020 22:09:49 +0000 (01:09 +0300)
* 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

index 96ee59db8e6b544fd6f848b81813b2c607e7cd2e..1cd2a7bb1338cc8763c3aac6edd2f11b5c20f380 100644 (file)
@@ -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)