mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
+magit/clone: fix void-function ghub--username
This commit is contained in:
@ -98,6 +98,8 @@ control in buffers."
|
|||||||
+ REPO: assumes {`+magit-default-clone-url'}/{USER}/REPO, where {USER} is
|
+ REPO: assumes {`+magit-default-clone-url'}/{USER}/REPO, where {USER} is
|
||||||
ascertained from your global gitconfig."
|
ascertained from your global gitconfig."
|
||||||
(interactive
|
(interactive
|
||||||
|
(progn
|
||||||
|
(require 'ghub)
|
||||||
(let* ((user (ghub--username (ghub--host)))
|
(let* ((user (ghub--username (ghub--host)))
|
||||||
(repo (read-from-minibuffer
|
(repo (read-from-minibuffer
|
||||||
"Clone repository (user/repo or url): "
|
"Clone repository (user/repo or url): "
|
||||||
@ -108,9 +110,10 @@ control in buffers."
|
|||||||
(read-directory-name
|
(read-directory-name
|
||||||
"Destination: "
|
"Destination: "
|
||||||
magit-clone-default-directory
|
magit-clone-default-directory
|
||||||
name nil name))))
|
name nil name)))))
|
||||||
(magit-clone
|
(magit-clone
|
||||||
(cond ((string-match-p "^[^/]+$" url-or-repo)
|
(cond ((string-match-p "^[^/]+$" url-or-repo)
|
||||||
|
(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)))
|
||||||
|
Reference in New Issue
Block a user