Next: , Previous: , Up: Inspecting   [Contents][Index]


5.6 References Buffer

y     (magit-show-refs-popup)

List and compare references in a dedicated buffer. By default all refs are compared with HEAD, but with a prefix argument this command instead acts as a prefix command and shows the following suffix commands along with the appropriate infix arguments in a popup buffer.

y y     (magit-show-refs-head)

List and compare references in a dedicated buffer. Refs are compared with HEAD.

y c     (magit-show-refs-current)

List and compare references in a dedicated buffer. Refs are compared with the current branch or HEAD if it is detached.

y o     (magit-show-refs)

List and compare references in a dedicated buffer. Refs are compared with a branch read from the user.

User Option: magit-refs-show-commit-count

Whether to show commit counts in Magit-Refs mode buffers.

The default is nil because anything else can be very expensive.

User Option: magit-refs-pad-commit-counts

Whether to pad all commit counts on all sides in Magit-Refs mode buffers.

If this is nil, then some commit counts are displayed right next to one of the branches that appear next to the count, without any space in between. This might look bad if the branch name faces look too similar to magit-dimmed.

If this is non-nil, then spaces are placed on both sides of all commit counts.

User Option: magit-refs-show-remote-prefix

Whether to show the remote prefix in lists of remote branches.

Showing the prefix is redundant because the name of the remote is already shown in the heading preceeding the list of its branches.

User Option: magit-refs-primary-column-width

Width of the primary column in ‘magit-refs-mode’ buffers. The primary column is the column that contains the name of the branch that the current row is about.

If this is an integer, then the column is that many columns wide. Otherwise it has to be a cons-cell of two integers. The first specifies the minimal width, the second the maximal width. In that case the actual width is determined using the length of the names of the shown local branches. (Remote branches and tags are not taken into account when calculating to optimal width.)

User Option: magit-refs-focus-column-width

Width of the focus column in ‘magit-refs-mode’ buffers.

The focus column is the first column, which marks one branch (usually the current branch) as the focused branch using * or @. For each other reference, this column optionally shows how many commits it is ahead of the focused branch and <, or if it isn’t ahead then the commits it is behind and >, or if it isn’t behind either, then a =.

This column may also display only * or @ for the focused branch, in which case this option is ignored. Use L v to change the verbosity of this column.

User Option: magit-refs-margin

This option specifies whether the margin is initially shown in Magit-Refs mode buffers and how it is formatted.

The value has the form (INIT STYLE WIDTH AUTHOR AUTHOR-WIDTH).

User Option: magit-refs-margin-for-tags

This option specifies whether to show information about tags in the margin. This is disabled by default because it is slow if there are many tags.

The following variables control how individual refs are displayed. If you change one of these variables (especially the "%c" part), then you should also change the others to keep things aligned. The following %-sequences are supported:

User Option: magit-refs-filter-alist

This alist controls which tags and branches are omitted from being displayed in magit-refs-mode buffers. If it is nil, then all refs are displayed (subject to magit-refs-sections-hook).

All keys are tried in order until one matches. Then its value is used and subsequent elements are ignored. If the value is non-nil, then the reference is displayed, otherwise it is not. If no element matches, then the reference is displayed.

A key can either be a regular expression that the refname has to match, or a function that takes the refname as only argument and returns a boolean. Contrary to how they are displayed in the buffer, for comparison each tag begins with "tags/" and each remote branch with "<remote>/".

RET     (magit-visit-ref)

This command visits the reference or revision at point in another buffer. If there is no revision at point or with a prefix argument then it prompts for a revision.

This command behaves just like magit-show-commit as described above, except if point is on a reference in a magit-refs-mode buffer, in which case the behavior may be different, but only if you have customized the option magit-visit-ref-behavior.

User Option: magit-visit-ref-behavior

This option controls how magit-visit-ref behaves in magit-refs-mode buffers.

By default magit-visit-ref behaves like magit-show-commit, in all buffers, including magit-refs-mode buffers. When the type of the section at point is commit then "RET" is bound to magit-show-commit, and when the type is either branch or tag then it is bound to magit-visit-ref.

"RET" is one of Magit’s most essential keys and at least by default it should behave consistently across all of Magit, especially because users quickly learn that it does something very harmless; it shows more information about the thing at point in another buffer.

However "RET" used to behave differently in magit-refs-mode buffers, doing surprising things, some of which cannot really be described as "visit this thing". If you’ve grown accustomed this behavior, you can restore it by adding one or more of the below symbols to the value of this option. But keep in mind that by doing so you don’t only introduce inconsistencies, you also lose some functionality and might have to resort to M-x magit-show-commit to get it back.

magit-visit-ref looks for these symbols in the order in which they are described here. If the presence of a symbol applies to the current situation, then the symbols that follow do not affect the outcome.


Next: , Previous: , Up: Inspecting   [Contents][Index]