Function: treesit--git-clone-repo

treesit--git-clone-repo is a byte-compiled function defined in treesit.el.gz.

Signature

(treesit--git-clone-repo URL REVISION WORKDIR)

Documentation

Clone repo pointed by URL at commit REVISION to WORKDIR.

REVISION may be nil, in which case the cloned repo will be at its default branch.

Source Code

;; Defined in /usr/src/emacs/lisp/treesit.el.gz
(defun treesit--git-clone-repo (url revision workdir)
  "Clone repo pointed by URL at commit REVISION to WORKDIR.

REVISION may be nil, in which case the cloned repo will be at its
default branch."
  (message "Cloning repository")
  ;; git clone xxx --depth 1 --quiet [-b yyy] workdir
  (if revision
      (treesit--call-process-signal
       "git" nil t nil "clone" url "--depth" "1" "--quiet"
       "-b" revision workdir)
    (treesit--call-process-signal
     "git" nil t nil "clone" url "--depth" "1" "--quiet"
     workdir)))