Function: magit-submodule-unpopulate

magit-submodule-unpopulate is an interactive and natively compiled function defined in magit-submodule.el.

Signature

(magit-submodule-unpopulate ARG1 ARG2)

Documentation

Remove working directories of 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

This command is not in any keymaps.

Source Code

;; Defined in /nix/store/irvbdy0zra0dn8fpd008f32x5ix6qm5v-emacs-packages-deps/share/emacs/site-lisp/elpa/magit-20261005.508/magit-submodule.el
;;;###autoload(autoload 'magit-submodule-unpopulate "magit-submodule" nil t)
(transient-define-suffix magit-submodule-unpopulate (modules args)
  "Remove working directories of 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."
  ;; Even when a submodule is "uninitialized" (it has no worktree)
  ;; the super-project's $GIT_DIR/config may never-the-less set the
  ;; module's url.  This may happen if you `deinit' and then `init'
  ;; to register (NOT initialize).  Because the purpose of `deinit'
  ;; is to remove the working directory AND to remove the url, this
  ;; command does not limit itself to modules that have no working
  ;; directory.
  :class 'magit--git-submodule-suffix
  :description "Unpopulate     git submodule deinit [--force]"
  (interactive
    (list (magit-module-confirm "Unpopulate")
          (magit-submodule-arguments "--force")))
  (magit-with-toplevel
    (magit-run-git-async "submodule" "deinit" args "--" modules)))