5.1.2 Status Header Sections
The contents of status buffers is controlled using the hook magit-status-sections-hook
(see Status Sections).
By default magit-insert-status-headers
is the first member of that hook variable.
function
magit-insert-status-headersβ
Insert headers sections appropriate for magit-status-mode
buffers. The sections are inserted by running the functions on the hook magit-status-headers-hook
.
user option
magit-status-headers-hookβ
Hook run to insert headers sections into the status buffer.
This hook is run by magit-insert-status-headers
, which in turn has to be a member of magit-status-sections-hook
to be used at all.
By default the following functions are members of the above hook:
function
magit-insert-error-headerβ
Insert a header line showing the message about the Git error that just occurred.
This function is only aware of the last error that occur when Git was run for side-effects. If, for example, an error occurs while generating a diff, then that error wonβt be inserted. Refreshing the status buffer causes this section to disappear again.
function
magit-insert-diff-filter-headerβ
Insert a header line showing the effective diff filters.
function
magit-insert-head-branch-headerβ
Insert a header line about the current branch or detached HEAD
.
function
magit-insert-upstream-branch-headerβ
Insert a header line about the branch that is usually pulled into the current branch.
function
magit-insert-push-branch-headerβ
Insert a header line about the branch that the current branch is usually pushed to.
function
magit-insert-tags-headerβ
Insert a header line about the current and/or next tag, along with the number of commits between the tag and HEAD
.
The following functions can also be added to the above hook:
function
magit-insert-repo-headerβ
Insert a header line showing the path to the repository top-level.
function
magit-insert-remote-headerβ
Insert a header line about the remote of the current branch.
If no remote is configured for the current branch, then fall back showing the "origin" remote, or if that does not exist the first remote in alphabetic order.
function
magit-insert-user-headerβ
Insert a header line about the current user.