Merge pull request #1459 from qhuyduong/fix-magit-clone

Fix magit-clone error
This commit is contained in:
Henrik Lissner 2019-06-07 14:19:31 +02:00 committed by GitHub
commit 4f1090d099
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -113,14 +113,15 @@ control in buffers."
"Destination: "
magit-clone-default-directory
name nil name)))))
(magit-clone
(magit-clone-regular
(cond ((string-match-p "^[^/]+$" url-or-repo)
(require 'ghub)
(format +magit-default-clone-url (ghub--username (ghub--host)) url-or-repo))
((string-match-p "^\\([^/]+\\)/\\([^/]+\\)/?$" url-or-repo)
(apply #'format +magit-default-clone-url (split-string url-or-repo "/" t)))
(url-or-repo))
dir))
dir
nil))
;;