Function: magit-submodule-register
magit-submodule-register is an interactive and byte-compiled function
defined in magit-submodule.el.
Signature
(magit-submodule-register ARG1)
Documentation
Register MODULES.
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-register "magit-submodule" nil t)
(transient-define-suffix magit-submodule-register (modules)
"Register MODULES.
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 command and the underlying "git submodule init" do NOT
;; "initialize" modules. They merely "register" modules in the
;; super-projects $GIT_DIR/config file, the purpose of which is to
;; allow users to change such values before actually initializing
;; the modules.
:description "Register git submodule init"
(interactive
(list (magit-module-confirm "Register" 'magit-module-no-worktree-p)))
(magit-with-toplevel
(magit-run-git-async "submodule" "init" "--" modules)))