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


5.3.4 Select from Log

When the user has to select a recent commit that is reachable from HEAD, using regular completion would be inconvenient (because most humans cannot remember hashes or "HEAD~5", at least not without double checking). Instead a log buffer is used to select the commit, which has the advantage that commits are presented in order and with the commit message.

Such selection logs are used when selecting the beginning of a rebase and when selecting the commit to be squashed into.

In addition to the key bindings available in all log buffers, the following additional key bindings are available in selection log buffers:

C-c C-c (magit-log-select-pick)

Select the commit at point and act on it. Call magit-log-select-pick-function with the selected commit as argument.

C-c C-k (magit-log-select-quit)

Abort selecting a commit, don’t act on any commit.

User Option: magit-log-select-margin

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

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

  • If INIT is non-nil, then the margin is shown initially.
  • STYLE controls how to format the author or committer date. It can be one of age (to show the age of the commit), age-abbreviated (to abbreviate the time unit to a character), or a string (suitable for format-time-string) to show the actual date. Option magit-log-margin-show-committer-date controls which date is being displayed.
  • WIDTH controls the width of the margin. This exists for forward compatibility and currently the value should not be changed.
  • AUTHOR controls whether the name of the author is also shown by default.
  • AUTHOR-WIDTH has to be an integer. When the name of the author is shown, then this specifies how much space is used to do so.

Next: Reflog, Previous: Log Margin, Up: Logging   [Contents][Index]