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


5.2 Repository List

Command: magit-list-repositories

This command displays a list of repositories in a separate buffer.

The option magit-repository-directories controls which repositories are displayed.

User Option: magit-repolist-columns

This option controls what columns are displayed by the command magit-list-repositories and how they are displayed.

Each element has the form (HEADER WIDTH FORMAT PROPS).

HEADER is the string displayed in the header. WIDTH is the width of the column. FORMAT is a function that is called with one argument, the repository identification (usually its basename), and with default-directory bound to the toplevel of its working tree. It has to return a string to be inserted or nil. PROPS is an alist that supports the keys :right-align, :pad-right and :sort.

The :sort function has a weird interface described in the docstring of tabulated-list--get-sort. Alternatively < and magit-repolist-version< can be used as those functions are automatically replaced with functions that satisfy the interface. Set :sort to nil to inhibit sorting; if unspecified, then the column is sortable using the default sorter.

You may wish to display a range of numeric columns using just one character per column and without any padding between columns, in which case you should use an appropriate HEADER, set WIDTH to 1, and set :pad-right to 9. + is substituted for numbers higher than 9.

The following functions can be added to the above option:

Function: magit-repolist-column-ident

This function inserts the identification of the repository. Usually this is just its basename.

Function: magit-repolist-column-path

This function inserts the absolute path of the repository.

Function: magit-repolist-column-version

This function inserts a description of the repository’s HEAD revision.

Function: magit-repolist-column-branch

This function inserts the name of the current branch.

Function: magit-repolist-column-upstream

This function inserts the name of the upstream branch of the current branch.

Function: magit-repolist-column-branches

This function inserts the number of branches.

Function: magit-repolist-column-stashes

This function inserts the number of stashes.

Function: magit-repolist-column-flag

This function inserts a flag as specified by magit-repolist-column-flag-alist.

By default this indicates whether there are uncommitted changes.

  • N if there is at least one untracked file.
  • U if there is at least one unstaged file.
  • S if there is at least one staged file.

Only the first one of these that applies is shown.

Function: magit-repolist-column-flags

This functions insert all flags as specified by magit-repolist-column-flag-alist.

This is an alternative to function magit-repolist-column-flag, which only lists the first one found.

Function: magit-repolist-column-unpulled-from-upstream

This function inserts the number of upstream commits not in the current branch.

Function: magit-repolist-column-unpulled-from-pushremote

This function inserts the number of commits in the push branch but not the current branch.

Function: magit-repolist-column-unpushed-to-upstream

This function inserts the number of commits in the current branch but not its upstream.

Function: magit-repolist-column-unpushed-to-pushremote

This function inserts the number of commits in the current branch but not its push branch.

The following commands are available in repolist buffers:

RET (magit-repolist-status)

This command shows the status for the repository at point.

m (magit-repolist-mark)

This command marks the repository at point.

u (magit-repolist-unmark)

This command unmarks the repository at point.

f (magit-repolist-fetch)

This command fetches all marked repositories. If no repositories are marked, then it offers to fetch all displayed repositories.

5 (magit-repolist-find-file-other-frame)

This command reads a relative file-name (without completion) and opens the respective file in each marked repository in a new frame. If no repositories are marked, then it offers to do this for all displayed repositories.


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