summary refs log tree commit diff
path: root/emacs/custom
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/custom')
-rw-r--r--emacs/custom/fcuny-git.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/emacs/custom/fcuny-git.el b/emacs/custom/fcuny-git.el
index ac9b837..7cc0feb 100644
--- a/emacs/custom/fcuny-git.el
+++ b/emacs/custom/fcuny-git.el
@@ -1,4 +1,5 @@
 (require 'fcuny-defuns)
+(require 'fcuny-vars)
 
 (use-package gitconfig-mode
   :ensure t)
@@ -120,4 +121,11 @@
 ;; with performances.
 (setq vc-handled-backends (delq 'Git vc-handled-backends))
 
+(defun fcuny/clone-repo (url)
+  "Clone a repository in the workspace"
+  (interactive "sURL:")
+  (let* ((repo-name (magit-clone--url-to-name url))
+         (target-dir (concat fcuny/path-workspace "/" repo-name)))
+    (magit-clone-regular url target-dir nil)))
+
 (provide 'fcuny-git)