diff --git a/man/html/git-new-branch.html b/man/html/git-new-branch.html index 4f11776820..ad6e714106 100644 --- a/man/html/git-new-branch.html +++ b/man/html/git-new-branch.html @@ -830,43 +830,51 @@ defaults to origin/master. This is considered to be the root

EXAMPLE

-

$ git map-branches
-origin/master
-  cool_feature
-    subfeature
-  fixit
-    frozen_branch *
+

$ git map-branches -v
+origin/master                               
+  cool_feature         [ ahead 4            ]
+    subfeature         [ ahead 2 | behind 1 ]
+  fixit                [ ahead 2            ]
+    frozen_branch *    [ ahead 3            ]
 $ git new-branch independent_cl
-$ git map-branches
-origin/master
-  cool_feature
-    subfeature
-  fixit
-    frozen_branch
-  independent_cl *
+$ git map-branches -v
+origin/master                              
+  cool_feature        [ ahead 4            ]
+    subfeature        [ ahead 2 | behind 1 ]
+  fixit               [ ahead 2            ]
+    frozen_branch     [ ahead 3            ]
+  independent_cl *                         
+$ vi foo && git add -A && git commit -m foo
+$ git map-branches -v
+origin/master                              
+  cool_feature        [ ahead 4            ]
+    subfeature        [ ahead 2 | behind 1 ]
+  fixit               [ ahead 2            ]
+    frozen_branch     [ ahead 3            ]
+  independent_cl *    [ ahead 1            ]
 $ git new-branch --upstream subfeature nested_cl
-$ git map-branches
-origin/master
-  cool_feature
-    subfeature <1>
-      nested_cl *
-  fixit
-    frozen_branch
-  independent_cl
+$ git map-branches -v
+origin/master                             
+  cool_feature       [ ahead 4            ]
+    subfeature       [ ahead 2 | behind 1 ] <1>
+      nested_cl *                         
+  fixit              [ ahead 2            ]
+    frozen_branch    [ ahead 3            ]
+  independent_cl     [ ahead 1            ]
 $ git checkout cool_feature
 Switched to branch 'cool_feature'
 Your branch is ahead of 'origin/master' by 4 commits.
   (use "git push" to publish your local commits)
 $ git new-branch --upstream_current cl_depends_on_cool_feature
-$ git map-branches
-origin/master
-  cool_feature
-    cl_depends_on_cool_feature *
-    subfeature
-      nested_cl
-  fixit
-    frozen_branch
-  independent_cl
+$ git map-branches -v
+origin/master                                            
+  cool_feature                      [ ahead 4            ]
+    cl_depends_on_cool_feature *                         
+    subfeature                      [ ahead 2 | behind 1 ]
+      nested_cl                                          
+  fixit                             [ ahead 2            ]
+    frozen_branch                   [ ahead 3            ]
+  independent_cl                    [ ahead 1            ]
 

  1. @@ -917,7 +925,7 @@ from

    diff --git a/man/man1/git-new-branch.1 b/man/man1/git-new-branch.1 index 14d50601ab..51469003c7 100644 --- a/man/man1/git-new-branch.1 +++ b/man/man1/git-new-branch.1 @@ -1,13 +1,13 @@ '\" t .\" Title: git-new-branch .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 12/15/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 12/05/2018 .\" Manual: Chromium depot_tools Manual -.\" Source: depot_tools f72f1ad +.\" Source: depot_tools 0379dbb3 .\" Language: English .\" -.TH "GIT\-NEW\-BRANCH" "1" "12/15/2016" "depot_tools f72f1ad" "Chromium depot_tools Manual" +.TH "GIT\-NEW\-BRANCH" "1" "12/05/2018" "depot_tools 0379dbb3" "Chromium depot_tools Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -77,43 +77,51 @@ This configures the default \fIupstream\fR for all new branches\&. If it is unse .RS 4 .\} .nf -\fB$ git map\-branches\fR +\fB$ git map\-branches \-v\fR origin/master - cool_feature - subfeature - fixit -\fB frozen_branch * + cool_feature [ ahead 4 ] + subfeature [ ahead 2 | behind 1 ] + fixit [ ahead 2 ] +\fB frozen_branch * [ ahead 3 ] $ git new\-branch independent_cl\fR -\fB$ git map\-branches\fR +\fB$ git map\-branches \-v\fR \fBorigin/master -\fR cool_feature - subfeature - fixit - frozen_branch +\fR cool_feature [ ahead 4 ] + subfeature [ ahead 2 | behind 1 ] + fixit [ ahead 2 ] + frozen_branch [ ahead 3 ] \fB independent_cl * +$ vi foo && git add \-A && git commit \-m foo\fR +\fB$ git map\-branches \-v\fR +origin/master + cool_feature [ ahead 4 ] + subfeature [ ahead 2 | behind 1 ] + fixit [ ahead 2 ] + frozen_branch [ ahead 3 ] +\fB independent_cl * [ ahead 1 ] $ git new\-branch \-\-upstream subfeature nested_cl\fR -\fB$ git map\-branches\fR +\fB$ git map\-branches \-v\fR origin/master - cool_feature -\fB subfeature \fR\fB\fB(1)\fR\fR\fB + cool_feature [ ahead 4 ] +\fB subfeature [ ahead 2 | behind 1 ] \fR\fB\fB(1)\fR\fR\fB nested_cl * -\fR fixit - frozen_branch - independent_cl +\fR fixit [ ahead 2 ] + frozen_branch [ ahead 3 ] + independent_cl [ ahead 1 ] \fB$ git checkout cool_feature\fR Switched to branch \*(Aqcool_feature\*(Aq Your branch is ahead of \*(Aqorigin/master\*(Aq by 4 commits\&. (use "git push" to publish your local commits) \fB$ git new\-branch \-\-upstream_current cl_depends_on_cool_feature\fR -\fB$ git map\-branches\fR +\fB$ git map\-branches \-v\fR origin/master -\fB cool_feature +\fB cool_feature [ ahead 4 ] cl_depends_on_cool_feature * -\fR subfeature +\fR subfeature [ ahead 2 | behind 1 ] nested_cl - fixit - frozen_branch - independent_cl + fixit [ ahead 2 ] + frozen_branch [ ahead 3 ] + independent_cl [ ahead 1 ] .fi .if n \{\ .RE diff --git a/man/src/git-new-branch.demo.1.sh b/man/src/git-new-branch.demo.1.sh index b0ce57faed..d6e3c34e6d 100755 --- a/man/src/git-new-branch.demo.1.sh +++ b/man/src/git-new-branch.demo.1.sh @@ -1,12 +1,17 @@ #!/usr/bin/env bash . demo_repo.sh -run git map-branches +run git map-branches -v run git new-branch independent_cl -run git map-branches +run git map-branches -v +praw vi foo \&\& git add -A \&\& git commit -m 'foo' +silent echo 'foo' >foo +silent git add -A +silent git commit -m 'foo' +run git map-branches -v run git new-branch --upstream subfeature nested_cl callout 3 -run git map-branches +run git map-branches -v run git checkout cool_feature 2>&1 run git new-branch --upstream_current cl_depends_on_cool_feature -run git map-branches +run git map-branches -v