Commit 03640c7f authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

Extend documentation for `git map-branches`

Document the -v and --no-color options.

R=iannucci@chromium.org

Change-Id: I07624403f591b23cc5701aa8201124fdfdb65781
Reviewed-on: https://chromium-review.googlesource.com/c/1360710Reviewed-by: 's avatarRobbie Iannucci <iannucci@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
parent 62d2286c
......@@ -307,8 +307,9 @@ def main(argv):
parser = argparse.ArgumentParser()
parser.add_argument('-v', action='count',
help=('Pass once to show tracking info; '
'twice for hash and review url'))
help=('Pass once to show tracking info, '
'twice for hash and review url, '
'thrice for review status'))
parser.add_argument('--no-color', action='store_true', dest='nocolor',
help='Turn off colors.')
parser.add_argument(
......
......@@ -819,6 +819,30 @@ Branches which have this as their parent are usually misconfigured, and
</div>
</div>
<div class="sect1">
<h2 id="_options">OPTIONS</h2>
<div class="sectionbody">
<div class="dlist"><dl>
<dt class="hdlist1">
--no-color
</dt>
<dd>
<p>
Turn off colors.
</p>
</dd>
<dt class="hdlist1">
-v
</dt>
<dd>
<p>
Be more verbose. Pass once to show tracking info, twice for hash and review
URL, thrice for review status.
</p>
</dd>
</dl></div>
</div>
</div>
<div class="sect1">
<h2 id="_example">EXAMPLE</h2>
<div class="sectionbody">
<div class="paragraph"><p>Given the hypothetical demo repo in <a href="git-map.html">git-map(1)</a>'s EXAMPLE section, and
......@@ -831,7 +855,15 @@ assuming that the <code>frozen_changes</code> branch was currently checked out,
</span><span style="color: #19c518"></span><span style="color: #19c518"> cool_feature
</span><span style="color: #19c518"></span><span style="color: #19c518"> subfeature
</span><span style="color: #19c518"></span><span style="color: #19c518"> fixit
</span><span style="color: #33d6e5"></span><span style="font-weight: bold; color: #33d6e5"> frozen_branch *</span>
</span><span style="color: #33d6e5"></span><span style="font-weight: bold; color: #33d6e5"> frozen_branch *
</span><span style="font-weight: bold; color: #ffffff">$ git map-branches -v</span>
<span style="color: #d338d3"></span><span style="color: #d338d3">{NO_UPSTREAM} </span><span style="color: #ffffff"> </span><span style="color: #d338d3"> </span><span style="color: #ffffff"> </span><span style="color: #d338d3"> </span><span style="color: #ffffff">
</span><span style="color: #19c518"></span><span style="color: #19c518"> no_upstream </span><span style="color: #ffffff"> </span><span style="color: #d338d3"> </span><span style="color: #ffffff"> </span><span style="color: #d338d3"> </span><span style="color: #ffffff">
</span><span style="color: #e42e16"></span><span style="color: #e42e16">origin/master </span><span style="color: #ffffff"> </span><span style="color: #d338d3"> </span><span style="color: #ffffff"> </span><span style="color: #d338d3"> </span><span style="color: #ffffff">
</span><span style="color: #19c518"></span><span style="color: #19c518"> cool_feature </span><span style="color: #ffffff">[ </span><span style="color: #d338d3">ahead 4 </span><span style="color: #ffffff"> </span><span style="color: #d338d3"> </span><span style="color: #ffffff">]
</span><span style="color: #19c518"></span><span style="color: #19c518"> subfeature </span><span style="color: #ffffff">[ </span><span style="color: #d338d3">ahead 2 </span><span style="color: #ffffff">| </span><span style="color: #d338d3">behind 1 </span><span style="color: #ffffff">]
</span><span style="color: #19c518"></span><span style="color: #19c518"> fixit </span><span style="color: #ffffff">[ </span><span style="color: #d338d3">ahead 6 </span><span style="color: #ffffff"> </span><span style="color: #d338d3"> </span><span style="color: #ffffff">]
</span><span style="color: #33d6e5"></span><span style="font-weight: bold; color: #33d6e5"> frozen_branch * </span><span style="font-weight: bold; color: #ffffff">[ </span><span style="font-weight: bold; color: #d338d3">ahead 3 </span><span style="font-weight: bold; color: #ffffff"> </span><span style="font-weight: bold; color: #d338d3"> </span><span style="font-weight: bold; color: #ffffff">]</span>
</code></pre></div></div><p><div class="paragraph"></p></div>
</div>
</div>
......@@ -865,7 +897,7 @@ from <a href="https://chromium.googlesource.com/chromium/tools/depot_tools.git">
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
Last updated 2016-12-15 15:36:52 PST
Last updated 2018-12-04 11:07:30 CET
</div>
</div>
</body>
......
'\" t
.\" Title: git-map-branches
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
.\" Date: 12/15/2016
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 12/04/2018
.\" Manual: Chromium depot_tools Manual
.\" Source: depot_tools f72f1ad
.\" Source: depot_tools 3edf049e
.\" Language: English
.\"
.TH "GIT\-MAP\-BRANCHES" "1" "12/15/2016" "depot_tools f72f1ad" "Chromium depot_tools Manual"
.TH "GIT\-MAP\-BRANCHES" "1" "12/04/2018" "depot_tools 3edf049e" "Chromium depot_tools Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
......@@ -139,6 +139,17 @@ Branches which have this as their parent are usually misconfigured, and should b
If multiple branches are on the same commit, they will all be cyan\&.
.sp .5v
.RE
.SH "OPTIONS"
.PP
\-\-no\-color
.RS 4
Turn off colors\&.
.RE
.PP
\-v
.RS 4
Be more verbose\&. Pass once to show tracking info, twice for hash and review URL, thrice for review status\&.
.RE
.SH "EXAMPLE"
.sp
Given the hypothetical demo repo in \fBgit-map\fR(1)\*(Aqs EXAMPLE section, and assuming that the frozen_changes branch was currently checked out, running \fIgit map\-branches\fR would result in an output like:
......@@ -156,7 +167,15 @@ origin/master
cool_feature
subfeature
fixit
\fB frozen_branch *\fR
\fB frozen_branch *
$ git map\-branches \-v\fR
{NO_UPSTREAM}
no_upstream
origin/master
cool_feature [ ahead 4 ]
subfeature [ ahead 2 | behind 1 ]
fixit [ ahead 6 ]
\fB frozen_branch * [ ahead 3 ]\fR
.fi
.if n \{\
.RE
......
......@@ -4,4 +4,5 @@
silent git branch no_upstream HEAD~
run git map-branches
run git map-branches -v
......@@ -29,6 +29,16 @@ Git map-branches displays all local branches such that:
NOTE: If multiple branches are on the same commit, they will all be cyan.
OPTIONS
-------
--no-color::
Turn off colors.
-v::
Be more verbose. Pass once to show tracking info, twice for hash and review
URL, thrice for review status.
EXAMPLE
-------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment