summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorKarthik Nayak <karthik.188@gmail.com>2017-01-10 08:49:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-01-31 20:43:04 (GMT)
commit3d9e4ce3ebef4f5aa47dad49f730e085f32b98da (patch)
treecada5fd03251f448fedd1754a54945bc0011ef6f /Documentation
parent949af0684c1f84587504e2143fca6f9bb8504e31 (diff)
downloadgit-3d9e4ce3ebef4f5aa47dad49f730e085f32b98da.zip
git-3d9e4ce3ebef4f5aa47dad49f730e085f32b98da.tar.gz
git-3d9e4ce3ebef4f5aa47dad49f730e085f32b98da.tar.bz2
branch: implement '--format' option
Implement the '--format' option provided by 'ref-filter'. This lets the user list branches as per desired format similar to the implementation in 'git for-each-ref'. Add tests and documentation for the same. Mentored-by: Christian Couder <christian.couder@gmail.com> Mentored-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr> Signed-off-by: Karthik Nayak <karthik.188@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-branch.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index 5516a47..1fae4ee 100644
--- a/Documentation/git-branch.txt
+++ b/Documentation/git-branch.txt
@@ -12,7 +12,7 @@ SYNOPSIS
[--list] [-v [--abbrev=<length> | --no-abbrev]]
[--column[=<options>] | --no-column]
[(--merged | --no-merged | --contains) [<commit>]] [--sort=<key>]
- [--points-at <object>] [<pattern>...]
+ [--points-at <object>] [--format=<format>] [<pattern>...]
'git branch' [--set-upstream | --track | --no-track] [-l] [-f] <branchname> [<start-point>]
'git branch' (--set-upstream-to=<upstream> | -u <upstream>) [<branchname>]
'git branch' --unset-upstream [<branchname>]
@@ -250,6 +250,11 @@ start-point is either a local or remote-tracking branch.
--points-at <object>::
Only list branches of the given object.
+--format <format>::
+ A string that interpolates `%(fieldname)` from the object
+ pointed at by a ref being shown. The format is the same as
+ that of linkgit:git-for-each-ref[1].
+
Examples
--------