Next: , Previous: , Up: Status Buffer   [Contents][Index]


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.


Next: , Previous: , Up: Status Buffer   [Contents][Index]