342
illustrate the differences between simplification settings. We assume
343
that you are filtering for a file `foo` in this commit graph:
344
-----------------------------------------------------------------------
345
- .-A---M---N---O---P
346
- / / / / /
347
- I B C D E
348
- \ / / / /
349
- `-------------'
345
+ .-A---M---N---O---P---Q
346
+ / / / / / /
347
+ I B C D E Y
348
+ \ / / / / /
349
+ `-------------' X
350
-----------------------------------------------------------------------
351
-The horizontal line of history A---P is taken to be the first parent of
351
+The horizontal line of history A---Q is taken to be the first parent of
352
each merge. The commits are:
353
354
* `I` is the initial commit, in which `foo` exists with contents
369
* `E` changes `quux` to "xyzzy", and its merge `P` combines the
370
strings to "quux xyzzy". `P` is TREESAME to `O`, but not to `E`.
371
372
+* `X` is an indpendent root commit that added a new file `side`, and `Y`
373
+ modified it. `Y` is TREESAME to `X`. Its merge `Q` added `side` to `P`, and
374
+ `Q` is TREESAME to `P`, but not to `Y`.
375
+
376
'rev-list' walks backwards through history, including or excluding
377
commits based on whether '\--full-history' and/or parent rewriting
378
(via '\--parents' or '\--children') are used. The following settings
413
the example, we get
414
+
415
-----------------------------------------------------------------------
412
- I A B N D O P
416
+ I A B N D O P Q
417
-----------------------------------------------------------------------
418
+
419
`M` was excluded because it is TREESAME to both parents. `E`,
434
themselves. This results in
435
+
436
-----------------------------------------------------------------------
433
- .-A---M---N---O---P
437
+ .-A---M---N---O---P---Q
438
/ / / / /
439
I B / D /
440
\ / / / /
444
Compare to '\--full-history' without rewriting above. Note that `E`
445
was pruned away because it is TREESAME, but the parent list of P was
446
rewritten to contain `E`'s parent `I`. The same happened for `C` and
443
-`N`.
447
+`N`, and `X`, `Y` and `Q`.
448
449
In addition to the above settings, you can change whether TREESAME
450
affects inclusion:
474
* Set `C'` to `C`.
475
+
476
* Replace each parent `P` of `C'` with its simplification `P'`. In
473
- the process, drop parents that are ancestors of other parents, and
474
- remove duplicates, but take care to never drop all parents that
475
- we are TREESAME to.
477
+ the process, drop parents that are ancestors of other parents or that are
478
+ root commits TREESAME to an empty tree, and remove duplicates, but take care
479
+ to never drop all parents that we are TREESAME to.
480
+
481
* If after this parent rewriting, `C'` is a root or merge commit (has
482
zero or >1 parents), a boundary commit, or !TREESAME, it remains.
494
`---------'
495
-----------------------------------------------------------------------
496
+
493
-Note the major differences in `N` and `P` over '--full-history':
497
+Note the major differences in `N`, `P` and `Q` over '--full-history':
498
+
499
--
500
* `N`'s parent list had `I` removed, because it is an ancestor of the
502
+
503
* `P`'s parent list similarly had `I` removed. `P` was then
504
removed completely, because it had one parent and is TREESAME.
505
++
506
+* `Q`'s parent list had `Y` simplified to `X`. `X` was then removed, because it
507
+ was a TREESAME root. `Q` was then removed completely, because it had one
508
+ parent and is TREESAME.
509
--
510
511
Finally, there is a fifth simplification mode available: