diff options
author | 2019-07-09 15:25:33 -0700 | |
---|---|---|
committer | 2019-07-09 15:25:33 -0700 | |
commit | 99eea645832d376a3b214b78a57adabf1fa96547 (patch) | |
tree | 523d1ade0aaa84b1ac0d9cda83a6e4b46f2a08d8 /Documentation | |
parent | The third batch (diff) | |
parent | branch: add worktree info on verbose output (diff) | |
download | tgif-99eea645832d376a3b214b78a57adabf1fa96547.tar.xz |
Merge branch 'nb/branch-show-other-worktrees-head'
"git branch --list" learned to show branches that are checked out
in other worktrees connected to the same repository prefixed with
'+', similar to the way the currently checked out branch is shown
with '*' in front.
* nb/branch-show-other-worktrees-head:
branch: add worktree info on verbose output
branch: update output to include worktree info
ref-filter: add worktreepath atom
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/git-branch.txt | 12 | ||||
-rw-r--r-- | Documentation/git-for-each-ref.txt | 5 |
2 files changed, 13 insertions, 4 deletions
diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index 6ebd512b4f..7c8fa3b64f 100644 --- a/Documentation/git-branch.txt +++ b/Documentation/git-branch.txt @@ -26,8 +26,10 @@ DESCRIPTION ----------- If `--list` is given, or if there are no non-option arguments, existing -branches are listed; the current branch will be highlighted with an -asterisk. Option `-r` causes the remote-tracking branches to be listed, +branches are listed; the current branch will be highlighted in green and +marked with an asterisk. Any branches checked out in linked worktrees will +be highlighted in cyan and marked with a plus sign. Option `-r` causes the +remote-tracking branches to be listed, and option `-a` shows both local and remote branches. If a `<pattern>` is given, it is used as a shell wildcard to restrict the output to matching branches. If multiple patterns are given, a branch is shown if @@ -174,8 +176,10 @@ This option is only applicable in non-verbose mode. When in list mode, show sha1 and commit subject line for each head, along with relationship to upstream branch (if any). If given twice, print - the name of the upstream branch, as well (see also `git remote - show <remote>`). + the path of the linked worktree (if any) and the name of the upstream + branch, as well (see also `git remote show <remote>`). Note that the + current worktree's HEAD will not have its path printed (it will always + be your current directory). -q:: --quiet:: diff --git a/Documentation/git-for-each-ref.txt b/Documentation/git-for-each-ref.txt index 774cecc7ed..6dcd39f6f6 100644 --- a/Documentation/git-for-each-ref.txt +++ b/Documentation/git-for-each-ref.txt @@ -214,6 +214,11 @@ symref:: `:lstrip` and `:rstrip` options in the same way as `refname` above. +worktreepath:: + The absolute path to the worktree in which the ref is checked + out, if it is checked out in any linked worktree. Empty string + otherwise. + In addition to the above, for commit and tag objects, the header field names (`tree`, `parent`, `object`, `type`, and `tag`) can be used to specify the value in the header field. |