Skip to main content

5.1.3 Status Module Sections

The contents of status buffers is controlled using the hook magit-status-sections-hook (see Status Sections).

By default magit-insert-modules is not a member of that hook variable.

function magit-insert-modules

Insert submodule sections.

Hook magit-module-sections-hook controls which module sections are inserted, and option magit-module-sections-nested controls whether they are wrapped in an additional section.

user option magit-module-sections-hook

Hook run by magit-insert-modules.

user option magit-module-sections-nested

This option controls whether magit-insert-modules wraps inserted sections in an additional section.

If this is non-nil, then only a single top-level section is inserted. If it is nil, then all sections listed in magit-module-sections-hook become top-level sections.

function magit-insert-modules-overview

Insert sections for all submodules. For each section insert the path, the branch, and the output of git describe --tags, or, failing that, the abbreviated HEAD commit hash.

Press RET on such a submodule section to show its own status buffer. Press RET on the "Modules" section to display a list of submodules in a separate buffer. This shows additional information not displayed in the super-repository’s status buffer.

function magit-insert-modules-unpulled-from-upstream

Insert sections for modules that haven’t been pulled from the upstream yet. These sections can be expanded to show the respective commits.

function magit-insert-modules-unpulled-from-pushremote

Insert sections for modules that haven’t been pulled from the push-remote yet. These sections can be expanded to show the respective commits.

function magit-insert-modules-unpushed-to-upstream

Insert sections for modules that haven’t been pushed to the upstream yet. These sections can be expanded to show the respective commits.

function magit-insert-modules-unpushed-to-pushremote

Insert sections for modules that haven’t been pushed to the push-remote yet. These sections can be expanded to show the respective commits.