Next: , Previous: , Up: Interface Concepts   [Contents][Index]

4.3 Transient Commands

Many Magit commands are implemented as transient commands. First the user invokes a prefix command, which causes its infix arguments and suffix commands to be displayed in the echo area. The user then optionally sets some infix arguments and finally invokes one of the suffix commands.

This is implemented in the library transient. Earlier Magit releases used the package magit-popup and even earlier versions library magit-key-mode.

Transient is documented in (transient)Top.

C-c C-c     (magit-dispatch)

This transient prefix command binds most of Magit’s other prefix commands as suffix commands and displays them in a temporary buffer until one of them is invoked. Invoking such a sub-prefix causes the suffixes of that command to be bound and displayed instead of those of magit-dispatch.

This command is also, or especially, useful outside Magit buffers, so you should setup a global binding:

(global-set-key (kbd "C-x M-g") 'magit-dispatch)

Transient commands remember the used arguments for subsequent invocations. Two transients, the log and diff transients (see Logging and Diffing), may behave a bit differently, depending on the value of magit-use-sticky-arguments.

User Option: magit-use-sticky-arguments

This option controls how the diff and log transients reuse arguments from existing buffers.

When t (the default value), then the log or diff transients reuses the arguments from the current repository’s log or diff buffer, respectively. When no log or diff buffer exists for the current repository, these transients use the default value of magit-log-arguments or magit-diff-arguments.

When current, log and diff transients will only reuse the arguments if the current buffer is derived from magit-log-mode or magit-diff-mode, respectively.

When nil, the default value of magit-log-arguments or magit-diff-arguments is always used.

Next: , Previous: , Up: Interface Concepts   [Contents][Index]