The contents of status buffers is controlled using the hook
magit-status-sections-hook (see Status Sections).
magit-insert-status-headers is the first member of that
Insert headers sections appropriate for
The sections are inserted by running the functions on the 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:
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.
Insert a header line showing the effective diff filters.
Insert a header line about the current branch or detached
Insert a header line about the branch that is usually pulled into the current branch.
Insert a header line about the branch that the current branch is usually pushed to.
Insert a header line about the current and/or next tag, along with
the number of commits between the tag and
The following functions can also be added to the above hook:
Insert a header line showing the path to the repository top-level.
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.
Insert a header line about the current user.