@@ -271,8 +271,8 @@ See also linkgit:git-reflog[1].
271
271
272
272
--boundary::
273
273
274
- Output uninteresting commits at the boundary, which are usually
275
- not shown .
274
+ Output excluded boundary commits. Boundary commits are
275
+ prefixed with `-` .
276
276
277
277
--
278
278
@@ -342,13 +342,13 @@ In the following, we will always refer to the same example history to
342
342
illustrate the differences between simplification settings. We assume
343
343
that you are filtering for a file `foo` in this commit graph:
344
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
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
352
each merge. The commits are:
353
353
354
354
* `I` is the initial commit, in which `foo` exists with contents
@@ -367,8 +367,11 @@ each merge. The commits are:
367
367
`N` and `D` to "foobarbaz"; i.e., it is not TREESAME to any parent.
368
368
369
369
* `E` changes `quux` to "xyzzy", and its merge `P` combines the
370
- strings to "quux xyzzy". Despite appearing interesting, `P` is
371
- TREESAME to all parents.
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`.
372
375
373
376
'rev-list' walks backwards through history, including or excluding
374
377
commits based on whether '\--full-history' and/or parent rewriting
@@ -410,10 +413,10 @@ parent lines.
410
413
the example, we get
411
414
+
412
415
-----------------------------------------------------------------------
413
- I A B N D O
416
+ I A B N D O P Q
414
417
-----------------------------------------------------------------------
415
418
+
416
- `P` and ` M` were excluded because they are TREESAME to a parent . `E`,
419
+ `M` was excluded because it is TREESAME to both parents . `E`,
417
420
`C` and `B` were all walked, but only `B` was !TREESAME, so the others
418
421
do not appear.
419
422
+
@@ -431,7 +434,7 @@ Along each parent, prune away commits that are not included
431
434
themselves. This results in
432
435
+
433
436
-----------------------------------------------------------------------
434
- .-A---M---N---O---P
437
+ .-A---M---N---O---P---Q
435
438
/ / / / /
436
439
I B / D /
437
440
\ / / / /
@@ -441,7 +444,7 @@ themselves. This results in
441
444
Compare to '\--full-history' without rewriting above. Note that `E`
442
445
was pruned away because it is TREESAME, but the parent list of P was
443
446
rewritten to contain `E`'s parent `I`. The same happened for `C` and
444
- `N`. Note also that `P` was included despite being TREESAME .
447
+ `N`, and `X`, `Y` and `Q` .
445
448
446
449
In addition to the above settings, you can change whether TREESAME
447
450
affects inclusion:
@@ -471,8 +474,9 @@ history according to the following rules:
471
474
* Set `C'` to `C`.
472
475
+
473
476
* Replace each parent `P` of `C'` with its simplification `P'`. In
474
- the process, drop parents that are ancestors of other parents, and
475
- remove duplicates.
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.
476
480
+
477
481
* If after this parent rewriting, `C'` is a root or merge commit (has
478
482
zero or >1 parents), a boundary commit, or !TREESAME, it remains.
@@ -490,14 +494,18 @@ The effect of this is best shown by way of comparing to
490
494
`---------'
491
495
-----------------------------------------------------------------------
492
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':
494
498
+
495
499
--
496
500
* `N`'s parent list had `I` removed, because it is an ancestor of the
497
501
other parent `M`. Still, `N` remained because it is !TREESAME.
498
502
+
499
503
* `P`'s parent list similarly had `I` removed. `P` was then
500
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.
501
509
--
502
510
503
511
Finally, there is a fifth simplification mode available:
0 commit comments