threads / patch / 8152

patch, 10 partsRe: [PATCH 08/10] user-manual: add a "counting commits" example

Subject: Re: [PATCH 08/10] user-manual: add a "counting commits" example

## tl;dr

5 messages between May 14, 2007 and May 14, 2007. Diffs are folded; open one to read it.

replies: 4people: 3as markdown or json

Frank Lichtenheld· May 14, 2007, 15:51 UTC · lore
On Mon, May 14, 2007 at 11:21:27AM -0400, J. Bruce Fields wrote:
Show 6 quoted lines
> +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
> +-------------------------------------------------
Shouldn't that be mybranch instead of maint?
Show 7 quoted lines
> +Alternatively you may often see this sort of thing done with the
> +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
> +-------------------------------------------------
Same here.
Gruesse,
-- 
Frank Lichtenheld <frank@lichtenheld.de>
www: http://www.djpig.de/
J. Bruce Fields· May 14, 2007, 16:03 UTC · re: Frank Lichtenheld · lore
On Mon, May 14, 2007 at 05:51:11PM +0200, Frank Lichtenheld wrote:
Show 19 quoted lines
> On Mon, May 14, 2007 at 11:21:27AM -0400, J. Bruce Fields wrote:
> > +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
> > +-------------------------------------------------
> 
> Shouldn't that be mybranch instead of maint?
> 
> > +Alternatively you may often see this sort of thing done with the
> > +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
> > +-------------------------------------------------
> 
> Same here.
Yep, thanks for the sharp eyes.
--b.
J. Bruce Fields· May 14, 2007, 16:05 UTC · re: J. Bruce Fields · lore

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

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" <bfields@citi.umich.edu>
---
 Documentation/user-manual.txt |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)
Show changes to Documentation/user-manual.txt +11 −7
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
Junio C Hamano· May 14, 2007, 21:31 UTC · re: J. Bruce Fields · lore

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

"J. Bruce Fields" <bfields@fieldses.org> writes:
Show 5 quoted lines
> 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.
> ...
Thanks everybody for participating in these fixups.

Bruce, how heavy is your workload these days? Would you mind if I ask you to collect the list comments, have me wait for a few days until the discussions and updates settle down and give me "Ok, all ready to be pulled" after that?

J. Bruce Fields· May 14, 2007, 21:38 UTC · re: Junio C Hamano · lore

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

On Mon, May 14, 2007 at 02:31:20PM -0700, Junio C Hamano wrote:
> Thanks everybody for participating in these fixups.
> 
> Bruce, how heavy is your workload these days?
Probably lighter than yours.
> Would you mind if I ask you to collect the list comments, have me wait
> for a few days until the discussions and updates settle down and give
> me "Ok, all ready to be pulled" after that?
Yep, that should be no problem.
--b.

← back to recent threads