Function: magit-submodule-populate

magit-submodule-populate is an autoloaded, interactive and byte-compiled function defined in magit-submodule.el.

Signature

(magit-submodule-populate ARG1 ARG2)

Documentation

Create MODULES working directories, checking out the recorded commits.

With a prefix argument act on all suitable modules. Otherwise, if the region selects modules, then act on those. Otherwise, if there is a module at point, then act on that. Otherwise read a single module from the user.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-submodule.el
;;;###autoload(autoload 'magit-submodule-populate "magit-submodule" nil t)
(transient-define-suffix magit-submodule-populate (modules args)
  "Create MODULES working directories, checking out the recorded commits.

With a prefix argument act on all suitable modules.  Otherwise,
if the region selects modules, then act on those.  Otherwise, if
there is a module at point, then act on that.  Otherwise read a
single module from the user."
  ;; This is the command that actually "initializes" modules.
  ;; A module is initialized when it has a working directory,
  ;; a gitlink, and a .gitmodules entry.
  :class 'magit--git-submodule-suffix
  :description "Populate       git submodule update --init [--recursive]"
  (interactive
    (list (magit-module-confirm "Populate" 'magit-module-no-worktree-p)
          (magit-submodule-arguments "--recursive")))
  (magit-with-toplevel
    (magit-run-git-async "submodule" "update" "--init" args "--" modules)))