Commit 2f1a0379 authored by Noam Postavsky's avatar Noam Postavsky

magit-clone: do all dir name manip in main path

rather than doing part of it in the `interactive' form.
parent fc32de65
......@@ -39,17 +39,15 @@
Then show the status buffer for the new repository."
(let ((url (magit-read-string-ns "Clone repository")))
(list url (file-name-as-directory
"Clone to: " nil nil nil
(and (string-match "\\([^./]+\\)\\(\\.git\\)?$" url)
(match-string 1 url))))))))
(list url (read-directory-name
"Clone to: " nil nil nil
(and (string-match "\\([^./]+\\)\\(\\.git\\)?$" url)
(match-string 1 url))))))
(setq directory (file-name-as-directory (expand-file-name directory)))
(message "Cloning %s..." repository)
(when (= (magit-call-git "clone" repository
;; Stop cygwin git making a "c:" directory.
(expand-file-name directory)))
(magit-convert-git-filename directory))
(message "Cloning %s...done" repository)
(magit-status-internal directory)))
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