git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fixup in git log's history simplification example
@ 2010-11-07 22:51 Benjamin Poirier
  0 siblings, 0 replies; only message in thread
From: Benjamin Poirier @ 2010-11-07 22:51 UTC (permalink / raw)
  To: git, gitster; +Cc: Thomas Rast

According to the description in git-log(1), at E, foo's content is
"asdf" and at P it is "foobarbaz". Therefore, a diff filtered for foo
between E and P is non-empty and P is !TREESAME to E.

Correct the statement regarding that in the example.

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
Cc: Thomas Rast <trast@student.ethz.ch>
---
It's a small change but I confirmed it by creating a repository with the
commits from the example. It can be accessed at:
	git clone git://github.com/benthaman/git-doc-hs_example.git

I also tested that the rest of the example is accurate nevertheless.

The claim that P and E are !TREESAME is supported by the following
operations:
1)
A diff filtered for foo between E and P is non-empty, therefore they
are !TREESAME:
	$ git diff :/E :/P -- foo
	diff --git a/foo b/foo
	index 8bd6648..b33c138 100644
	--- a/foo
	+++ b/foo
	@@ -1 +1 @@
	-asdf
	+foobarbaz

2)
	$ git log --sparse --oneline master -- foo
	b0ee555 P
	c930763 O
	6282898 D
	5cb421e N
	d7c4f29 C
	fc9e858 M
	6be6304 A
	e06936d I

E is not included because it is !TREESAME, as the documentation for
'--sparse' predicts:
	"Note that without --full-history, this still simplifies merges: if
	one of the parents is TREESAME, we follow only that one, so the
	other sides of the merge are never walked."
---
 Documentation/rev-list-options.txt |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt
index 7a42567..46b98a0 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -436,8 +436,9 @@ each merge.  The commits are:
   `N` and `D` to "foobarbaz"; i.e., it is not TREESAME to any parent.
 
 * `E` changes `quux` to "xyzzy", and its merge `P` combines the
-  strings to "quux xyzzy".  Despite appearing interesting, `P` is
-  TREESAME to all parents.
+  strings to "quux xyzzy".  `P` is TREESAME to `O` and !TREESAME to
+  `E`.
+
 
 'rev-list' walks backwards through history, including or excluding
 commits based on whether '\--full-history' and/or parent rewriting
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-11-07 23:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-07 22:51 [PATCH] fixup in git log's history simplification example Benjamin Poirier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).