-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Left behind the two shell-command-to-string calls. They should be benign in failiure. Just returns error string if no git bin, so user can see the situation ahead of the actual clone call. Signed-off-by: Psionik K <[email protected]>
- Loading branch information
Showing
1 changed file
with
16 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -352,23 +352,22 @@ rename script. Each rev is intended only to be able to rename | |
itself, as a quine and for forking as a new template repository." | ||
(interactive "DClone to directory:") | ||
(if-let ((git-bin (executable-find "git"))) | ||
(progn | ||
(shell-command | ||
(format "cd %s; %s clone https://github.com/%s/%s.git %s" | ||
clone-root git-bin | ||
erk-github-userorg | ||
erk-github-package-name | ||
package-name)) | ||
(let ((default-directory (concat clone-root "/" package-name "/"))) | ||
(when rev | ||
(shell-command (format "%s checkout %s" git-bin rev))) | ||
(shell-command | ||
(format "%s remote rm origin" git-bin)) | ||
(shell-command | ||
(format "%s remote add origin [email protected]:%s/%s.git" | ||
git-bin user-org package-name))) | ||
;; return value for renaming | ||
(concat clone-root "/" package-name "/")) | ||
(let ((default-directory clone-root) | ||
(output (get-buffer-create "erk-clone"))) | ||
(call-process | ||
git-bin nil output nil | ||
"clone" | ||
(format "https://github.com/%s/%s.git" | ||
erk-github-userorg erk-github-package-name) | ||
(concat default-directory "/" package-name)) | ||
(let ((default-directory (concat clone-root "/" package-name))) | ||
(when rev (call-process git-bin nil output nil "checkout" rev)) | ||
(call-process git-bin nil output nil "remote" "rm" "origin") | ||
(call-process git-bin nil output nil "remote" "add" "origin" | ||
(format "[email protected]:%s/%s.git" | ||
user-org package-name)) | ||
;; return value for renaming | ||
(concat clone-root "/" package-name "/"))) | ||
(error "Could not find git executible"))) | ||
|
||
;;;###autoload | ||
|