From: Benjamin Poirier <benjamin.poirier@polymtl.ca>
To: git@vger.kernel.org, gitster@pobox.com
Cc: Thomas Rast <trast@student.ethz.ch>
Subject: [PATCH] fixup in git log's history simplification example
Date: Sun, 7 Nov 2010 17:51:05 -0500 [thread overview]
Message-ID: <1289170265-994-1-git-send-email-benjamin.poirier@polymtl.ca> (raw)
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
reply other threads:[~2010-11-07 23:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1289170265-994-1-git-send-email-benjamin.poirier@polymtl.ca \
--to=benjamin.poirier@polymtl.ca \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=trast@student.ethz.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).