]> git.eshelyaron.com Git - emacs.git/commitdiff
Use vc-git-repository-url in vc-git-dir-extra-headers
authorTassilo Horn <tsdh@gnu.org>
Mon, 15 Jun 2020 07:07:12 +0000 (09:07 +0200)
committerTassilo Horn <tsdh@gnu.org>
Mon, 15 Jun 2020 07:07:12 +0000 (09:07 +0200)
* lisp/vc/vc-git.el (vc-git-dir-extra-headers): Use
vc-git-repository-url for getting the remote's URL.

lisp/vc/vc-git.el

index 636f9dfd0ca81356bc8051cf63046aa969c2b642..96ee59db8e6b544fd6f848b81813b2c607e7cd2e 100644 (file)
@@ -748,13 +748,7 @@ or an empty string if none."
          (when (string-match "\\([^\n]+\\)" remote)
            (setq remote (match-string 1 remote)))
          (when remote
-           (setq remote-url
-                 (with-output-to-string
-                   (with-current-buffer standard-output
-                     (vc-git--out-ok "config"
-                                      (concat "remote." remote ".url"))))))
-         (when (string-match "\\([^\n]+\\)" remote-url)
-           (setq remote-url (match-string 1 remote-url))))
+           (setq remote-url (vc-git-repository-url dir remote))))
       (setq branch "not (detached HEAD)"))
     (when stash-list
       (let* ((len (length stash-list))
@@ -821,10 +815,10 @@ or an empty string if none."
      (when (file-exists-p (expand-file-name ".git/rebase-apply" (vc-git-root dir)))
        (propertize  "\nRebase     : in progress" 'face 'font-lock-warning-face))
      (if stash-list
-       (concat
-        (propertize "\nStash      : " 'face 'font-lock-type-face)
-        stash-button
-        stash-string)
+         (concat
+          (propertize "\nStash      : " 'face 'font-lock-type-face)
+          stash-button
+          stash-string)
        (concat
        (propertize "\nStash      : " 'face 'font-lock-type-face)
        (propertize "Nothing stashed"