@matheusbsbs / matheus-bagliano / commits / d266a98845
Fork 0

Documentation: rev-list-options: move --simplify-merges documentation

Fits --simplify-merges documentation into the 'History Simplification' section, including example. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Thomas Rast committed Aug 12, 2008 at 01:55 UTC d266a988456fcaab9918eae39f5faf8dcb20cb26
1 file changed +42 -6
Documentation/rev-list-options.txt
+42 -6
@@ -193,12 +193,6 @@ endif::git-rev-list[]
193
194 Stop when a given path disappears from the tree.
195
196 ---simplify-merges::
197 -
198 - Simplify away commits that did not change the given paths, similar
199 - to `--full-history`, and further remove merges none of whose
200 - parent history changes the given paths.
201 -
196 --no-merges::
197
198 Do not print commits with more than one parent.
@@ -413,6 +407,48 @@ Note that without '\--full-history', this still simplifies merges: if
407 one of the parents is TREESAME, we follow only that one, so the other
408 sides of the merge are never walked.
409
410 +Finally, there is a fourth simplification mode available:
411 +
412 +--simplify-merges::
413 +
414 + First, build a history graph in the same way that
415 + '\--full-history' with parent rewriting does (see above).
416 ++
417 +Then simplify each commit `C` to its replacement `C'` in the final
418 +history according to the following rules:
419 ++
420 +--
421 +* Set `C'` to `C`.
422 ++
423 +* Replace each parent `P` of `C'` with its simplification `P'`. In
424 + the process, drop parents that are ancestors of other parents, and
425 + remove duplicates.
426 ++
427 +* If after this parent rewriting, `C'` is a root or merge commit (has
428 + zero or >1 parents), a boundary commit, or !TREESAME, it remains.
429 + Otherwise, it is replaced with its only parent.
430 +--
431 ++
432 +The effect of this is best shown by way of comparing to
433 +'\--full-history' with parent rewriting. The example turns into:
434 ++
435 +-----------------------------------------------------------------------
436 + .-A---M---N---O
437 + / / /
438 + I B D
439 + \ / /
440 + `---------'
441 +-----------------------------------------------------------------------
442 ++
443 +Note the major differences in `N` and `P` over '\--full-history':
444 ++
445 +--
446 +* `N`'s parent list had `I` removed, because it is an ancestor of the
447 + other parent `M`. Still, `N` remained because it is !TREESAME.
448 ++
449 +* `P`'s parent list similarly had `I` removed. `P` was then
450 + removed completely, because it had one parent and is TREESAME.
451 +--
452
453 ifdef::git-rev-list[]
454 Bisection Helpers