Compare commits

..

3 Commits

View File

@@ -85,7 +85,8 @@ See `magit-git-executable'."
(defun majjit-run-jj-async (directory &rest args) (defun majjit-run-jj-async (directory &rest args)
"Start jujutsu and return the process object. "Start jujutsu and return the process object.
ARGS is flattened and then used as arguments to jujutsu. ARGS is flattened and then used as arguments to jujutsu. Once cloning is
done, open DIRECTORY with `find-file'.
Inspired by `magit-start-git'." Inspired by `magit-start-git'."
(let ((default-process-coding-system (magit--process-coding-system)) (let ((default-process-coding-system (magit--process-coding-system))
@@ -140,6 +141,19 @@ If COLOCATE-P is t, colocate the repository with git."
repository repository
(magit-convert-filename-for-git directory)))) (magit-convert-filename-for-git directory))))
;;;###autoload
(defun majjit-clone-from-url (url)
"Clone a repository from a known URL."
(let ((directory (read-directory-name
"Clone to: "
(if (functionp majjit-default-directory)
(funcall majjit-default-directory)
majjit-default-directory)
nil nil
(magit-clone--url-to-name url)))
(colocate-p (yes-or-no-p "Colocate? ")))
(majjit--internal url directory colocate-p)))
;;;###autoload ;;;###autoload
(defun majjit-clone (repository directory colocate-p) (defun majjit-clone (repository directory colocate-p)
"Clone a git REPOSITORY using jujutsu into a DIRECTORY. "Clone a git REPOSITORY using jujutsu into a DIRECTORY.