Don't require network connection when looking up URL for current git remote

This commit is contained in:
Steve Purcell 2012-04-20 16:53:52 +01:00
parent 6e25a6da87
commit d86ed7e2c0

View file

@ -227,7 +227,7 @@ seconds; the server cuts off after 10 requests in 20 seconds.")
(defun pb/git-repo (dir)
"Get the current git repo for DIR."
(with-temp-buffer
(pb/run-process dir "git" "remote" "show" "origin")
(pb/run-process dir "git" "remote" "show" "-n" "origin")
(goto-char (point-min))
(re-search-forward "Fetch URL: \\(.*\\)")
(match-string-no-properties 1)))