diff options
author | Jeff King <peff@peff.net> | 2013-01-31 01:45:46 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-01-31 16:37:16 -0800 |
commit | de90ff81f3bba50776b934842112eeb6e69a0d23 (patch) | |
tree | 8da2adc56964173cdaac4e2974121b7040e528a2 | |
parent | branch: mark more strings for translation (diff) | |
download | tgif-de90ff81f3bba50776b934842112eeb6e69a0d23.tar.xz |
docs: clarify git-branch --list behavior
It was not clear from the "description" section of git-branch(1)
that using a <pattern> meant that you _had_ to use the --list
option. Let's clarify that, and while we're at it, reword some
clunky and ambiguous sentences.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | Documentation/git-branch.txt | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index 45a225e0aa..2635dee413 100644 --- a/Documentation/git-branch.txt +++ b/Documentation/git-branch.txt @@ -22,13 +22,15 @@ SYNOPSIS DESCRIPTION ----------- -With no arguments, existing branches are listed and the current branch will -be highlighted with an asterisk. Option `-r` causes the remote-tracking -branches to be listed, and option `-a` shows both. This list mode is also -activated by the `--list` option (see below). -<pattern> restricts the output to matching branches, the pattern is a shell -wildcard (i.e., matched using fnmatch(3)). -Multiple patterns may be given; if any of them matches, the branch is shown. +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, +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 +it matches any of the patterns. Note that when providing a +`<pattern>`, you must use `--list`; otherwise the command is interpreted +as branch creation. With `--contains`, shows only the branches that contain the named commit (in other words, the branches whose tip commits are descendants of the |