Function: magit-clone-shallow

magit-clone-shallow is an autoloaded, interactive and byte-compiled function defined in magit-clone.el.

Signature

(magit-clone-shallow REPOSITORY DIRECTORY ARGS DEPTH)

Documentation

Create a shallow clone of REPOSITORY in DIRECTORY.

Then show the status buffer for the new repository. With a prefix argument read the DEPTH of the clone; otherwise use 1.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-clone.el
;;;###autoload
(defun magit-clone-shallow (repository directory args depth)
  "Create a shallow clone of REPOSITORY in DIRECTORY.
Then show the status buffer for the new repository.
With a prefix argument read the DEPTH of the clone;
otherwise use 1."
  (interactive (append (magit-clone-read-args)
                       (list (if current-prefix-arg
                                 (read-number "Depth: " 1)
                               1))))
  (magit-clone-internal repository directory
                        (cons (format "--depth=%s" depth) args)))