Fix magit-clone error

magit-clone function has changed signature to work with transient.
So using the new magit-clone-regular instead.

Signed-off-by: Huy Duong <huy.duong@employmenthero.com>
This commit is contained in:
Huy Duong 2019-06-03 16:59:03 +07:00
parent 32e266cfb4
commit c4b325fa4b

View file

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