Function: magit-submodule-update
magit-submodule-update is an autoloaded, interactive and byte-compiled
function defined in magit-submodule.el.
Signature
(magit-submodule-update ARG1 ARG2)
Documentation
Update MODULES by 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-update "magit-submodule" nil t)
(transient-define-suffix magit-submodule-update (modules args)
"Update MODULES by 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."
;; Unlike `git-submodule's `update' command ours can only update
;; "initialized" modules by checking out other commits but not
;; "initialize" modules by creating the working directories.
;; To do the latter we provide the "setup" command.
:class 'magit--git-submodule-suffix
:description "Update git submodule update [--force] [--no-fetch]
[--remote] [--recursive] [--checkout|--rebase|--merge]"
(interactive
(list (magit-module-confirm "Update" 'magit-module-worktree-p)
(magit-submodule-arguments
"--force" "--remote" "--recursive" "--checkout" "--rebase" "--merge"
"--no-fetch")))
(magit-with-toplevel
(magit-run-git-async "submodule" "update" args "--" modules)))