aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-branch.txt
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-02-07 14:41:38 -0800
committerJunio C Hamano <gitster@pobox.com>2013-02-07 14:41:38 -0800
commitf507784d2c956fc73f3791b04cc80e7e0dae0a4d (patch)
tree53e4add6b038d1a2d8a69b59a93315e71e5fca9a /Documentation/git-branch.txt
parent9a1ab9e72fe8acd03b92bb481d7cd95207fda8f5 (diff)
parentd040350813986e0f4bb3aeb977077975c1552606 (diff)
downloadgit-f507784d2c956fc73f3791b04cc80e7e0dae0a4d.tar.gz
Merge branch 'nd/branch-error-cases'
Fix various error messages and conditions in "git branch", e.g. we advertised "branch -d/-D" to remove one or more branches but actually implemented removal of zero or more branches---request to remove no branches was not rejected. * nd/branch-error-cases: branch: let branch filters imply --list docs: clarify git-branch --list behavior branch: mark more strings for translation branch: give a more helpful message on redundant arguments branch: reject -D/-d without branch name
Diffstat (limited to 'Documentation/git-branch.txt')
-rw-r--r--Documentation/git-branch.txt22
1 files changed, 12 insertions, 10 deletions
diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index d4a9be22e6..b7cb625b89 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
@@ -193,15 +195,15 @@ start-point is either a local or remote-tracking branch.
--contains [<commit>]::
Only list branches which contain the specified commit (HEAD
- if not specified).
+ if not specified). Implies `--list`.
--merged [<commit>]::
Only list branches whose tips are reachable from the
- specified commit (HEAD if not specified).
+ specified commit (HEAD if not specified). Implies `--list`.
--no-merged [<commit>]::
Only list branches whose tips are not reachable from the
- specified commit (HEAD if not specified).
+ specified commit (HEAD if not specified). Implies `--list`.
<branchname>::
The name of the branch to create or delete.