Next: , Up: Status buffer   [Contents][Index]


5.1.1 Status sections

The contents of status buffers is controlled using the hook magit-status-sections-hook. See Section hooks to learn about such hooks and how to customize them.

User Option: magit-status-sections-hook

Hook run to insert sections into a status buffer.

The first function on that hook by default is magit-insert-status-headers; it is described in the next section. By default the following functions are also members of that hook:

Function: magit-insert-merge-log

Insert section for the on-going merge. Display the heads that are being merged. If no merge is in progress, do nothing.

Function: magit-insert-rebase-sequence

Insert section for the on-going rebase sequence. If no such sequence is in progress, do nothing.

Function: magit-insert-am-sequence

Insert section for the on-going patch applying sequence. If no such sequence is in progress, do nothing.

Function: magit-insert-sequencer-sequence

Insert section for the on-going cherry-pick or revert sequence. If no such sequence is in progress, do nothing.

Function: magit-insert-bisect-output

While bisecting, insert section with output from git bisect.

Function: magit-insert-bisect-rest

While bisecting, insert section visualizing the bisect state.

Function: magit-insert-bisect-log

While bisecting, insert section logging bisect progress.

Function: magit-insert-untracked-files

Maybe insert a list or tree of untracked files.

Do so depending on the value of status.showUntrackedFiles. Note that even if the value is all, Magit still initially only shows directories. But the directory sections can then be expanded using TAB.

Function: magit-insert-unstaged-changes

Insert section showing unstaged changes.

Function: magit-insert-staged-changes

Insert section showing staged changes.

Function: magit-insert-stashes &optional ref heading

Insert the stashes section showing reflog for "refs/stash". If optional REF is non-nil show reflog for that instead. If optional HEADING is non-nil use that as section heading instead of "Stashes:".

Function: magit-insert-unpulled-from-upstream

Insert section showing commits that haven’t been pulled from the upstream branch yet.

Function: magit-insert-unpulled-from-pushremote

Insert section showing commits that haven’t been pulled from the push-remote branch yet.

Function: magit-insert-unpushed-to-upstream

Insert section showing commits that haven’t been pushed to the upstream yet.

Function: magit-insert-unpushed-to-pushremote

Insert section showing commits that haven’t been pushed to the push-remote yet.

The following functions can also be added to the above hook:

Function: magit-insert-tracked-files

Insert a tree of tracked files.

Function: magit-insert-unpulled-or-recent-commits

Insert section showing unpulled or recent commits. If an upstream is configured for the current branch and it is ahead of the current branch, then show the missing commits. Otherwise, show the last magit-log-section-commit-count commits.

Function: magit-insert-recent-commits

Insert section showing the last magit-log-section-commit-count commits.

User Option: magit-log-section-commit-count

How many recent commits magit-insert-recent-commits and magit-insert-unpulled-or-recent-commits (provided there are no unpulled commits) show.

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.

Function: magit-insert-submodules

Insert sections for all submodules. For each section insert the path, the branch, and the output of git describe --tags.

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-unpulled-cherries

Insert section showing unpulled commits. Like magit-insert-unpulled-commits but prefix each commit that has not been applied yet (i.e. a commit with a patch-id not shared with any local commit) with "+", and all others with "-".

Function: magit-insert-unpushed-cherries

Insert section showing unpushed commits. Like magit-insert-unpushed-commits but prefix each commit which has not been applied to upstream yet (i.e. a commit with a patch-id not shared with any upstream commit) with "+" and all others with "-".

See References buffer for some more section inserters, which could be used here.


Next: , Up: Status buffer   [Contents][Index]