[PATCH] fixup in git log's history simplification example
From: Benjamin Poirier <hidden>
Date: 2016-06-15 22:49:59
Subsystem:
documentation, the rest · Maintainers:
Jonathan Corbet, Linus Torvalds
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 <redacted> Cc: Thomas Rast <redacted> --- 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