Function: vc-git-repository-url

vc-git-repository-url is a byte-compiled function defined in vc-git.el.gz.

Signature

(vc-git-repository-url FILE-OR-DIR &optional REMOTE-NAME)

Source Code

;; Defined in /usr/src/emacs/lisp/vc/vc-git.el.gz
(defun vc-git-repository-url (file-or-dir &optional remote-name)
  (let ((default-directory (vc-git-root file-or-dir)))
    (with-temp-buffer
      (vc-git-command (current-buffer) 0 nil "remote" "get-url"
                      (or remote-name "origin"))
      (buffer-substring-no-properties (point-min) (1- (point-max))))))