Commit bcd633af authored by Jonathan Leech-Pepin's avatar Jonathan Leech-Pepin Committed by Jonas Bernoulli

magit--github-remote-p: Use "git remote get-url" to get actual url

Using the value from the repo's ".git/config" does not expand in cases
where an alias is being used as the remote name.  Using "git remote
get-url" instead expands the url into what is actually being used (and
then supports both the alias and a more complete github url to match
parent a5fabcfd
......@@ -139,9 +139,9 @@ exist, then raise an error."
(defun magit--github-remote-p (remote)
(or (--when-let (magit-get "remote" remote "pushurl")
(or (--when-let (magit-git-string "remote" "get-url" "--push" remote)
(magit--github-url-p it))
(--when-let (magit-get "remote" remote "url")
(--when-let (magit-git-string "remote" "get-url" "--all" remote)
(magit--github-url-p it))))
(defun magit--github-url-equal (r1 r2)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment