Thread (3 messages) flat view 3 messages, 2 authors, 2016-06-15
DORMANTno replies

[PATCH] user-manual: fix branch names in examples

From: J. Bruce Fields <hidden>
Date: 2016-06-15 22:43:10
Subsystem: documentation, the rest · Maintainers: Jonathan Corbet, Linus Torvalds

Thanks to Frank Lichtenheld for pointing out inconsistent use of branch
names in a couple examples.

Add a little more example output while I'm at it.

At some point actually it might be good for someone to figure out a good
example to use consistently throughout the manual and tutorials; it
might make them a little easier to read.

Signed-off-by: "J. Bruce Fields" <redacted>
---
 Documentation/user-manual.txt |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index 9fc2bba..5fb86f2 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -701,7 +701,7 @@ Suppose you want to know how many commits you've made on "mybranch"
 since it diverged from "origin":
 
 -------------------------------------------------
-$ git log --pretty=oneline origin..maint | wc -l
+$ git log --pretty=oneline origin..mybranch | wc -l
 -------------------------------------------------
 
 Alternatively you may often see this sort of thing done with the
@@ -709,7 +709,7 @@ lower-level command gitlink:git-rev-list[1], which just lists the SHA1's
 of all the given commits:
 
 -------------------------------------------------
-$ git rev-list origin..maint | wc -l
+$ git rev-list origin..mybranch | wc -l
 -------------------------------------------------
 
 [[checking-for-equal-branches]]
@@ -849,19 +849,23 @@ a07157ac624b2524a059a3414e99f6f44bebc1e7 refs/heads/master
 1e87486ae06626c2f31eaa63d26fc0fd646c8af2 refs/heads/tutorial-fixes
 -------------------------------------------------
 
-We can get just the branch-head names, and remove "maint", with
+We can get just the branch-head names, and remove "master", with
 the help of the standard utilities cut and grep:
 
 -------------------------------------------------
-$ git show-ref --heads | cut -d' ' -f2 | grep -v '^refs/heads/maint'
+$ git show-ref --heads | cut -d' ' -f2 | grep -v '^refs/heads/master'
+refs/heads/core-tutorial
+refs/heads/maint
+refs/heads/tutorial-2
+refs/heads/tutorial-fixes
 -------------------------------------------------
 
-And then we can ask to see all the commits reachable from maint
+And then we can ask to see all the commits reachable from master
 but not from these other heads:
 
 -------------------------------------------------
-$ gitk maint --not $( git show-ref --heads | cut -d' ' -f2 |
-				grep -v '^refs/heads/maint' )
+$ gitk master --not $( git show-ref --heads | cut -d' ' -f2 |
+				grep -v '^refs/heads/master' )
 -------------------------------------------------
 
 Obviously endless variations are possible; to see all commits
-- 
1.5.1.4.19.g69e2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help