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-ignored-filesβ
Insert a tree of ignored files. Its possible to limit the logs in the current buffer to a certain directory using D = f <DIRECTORY> RET g
. If you do that, then that that also affects this command.
The log filter can be used to limit to multiple files. In that case this function only respects the first of the files and only if it is a directory.
function
magit-insert-skip-worktree-filesβ
Insert a tree of skip-worktree files. If the first element of magit-buffer-diff-files
is a directory, then limit the list to files below that. The value of that variable can be set using D -- DIRECTORY RET g
.
function
magit-insert-assumed-unchanged-filesβ
Insert a tree of files that are assumed to be unchanged. If the first element of magit-buffer-diff-files
is a directory, then limit the list to files below that. The value of that variable can be set using D -- DIRECTORY RET g
.
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-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.