On 10/10/2019 18:19, Derrick Stolee wrote:
> On 10/10/2019 12:13 PM, James Coglan via GitGitGadget wrote:
>> +++ b/t/t4215-log-skewed-merges.sh
>> @@ -0,0 +1,42 @@
>> +#!/bin/sh
>> +
>> +test_description='git log --graph of skewed merges'
>> +
>> +. ./test-lib.sh
>> +
>> +test_expect_success 'setup left-skewed merge' '
> 
> 
> Could you skew this example to include a left-skewed octopus merge
> (and use fewer Git processes) with the following:
> 
>       git checkout --orphan _a && test_commit A &&
>       git switch -c _b _a && test_commit B &&
>       git switch -c _c _a && test_commit C &&
>       git switch -c _d _a && test_commit D && git switch -c _e _b && git 
> merge --no-ff _c _d E &&
>       git switch -c _f _a && git merge --no-ff _d -m F &&     git checkout _a 
> && git merge --no-ff _b _c _e _f -m G
> and I think the resulting output will be:
> 
> *-----.   G
> |\ \ \ \
> | | | | * F
> | |_|_|/|
> |/| | | |
> | | | * | E
> | |_|/|\|
> |/| | | |
> | | |/  * D
> | |_|__/
> |/| |
> | | * C
> | |/
> |/|
> | * B
> |/
> * A

At this point in the history, commit E won't render like that -- this is before 
the change that flattens edges that fuse with the merge's last parent. I think 
the display of this history at this point will be:

        *-----.   G
        |\ \ \ \
        | | | | * F
        | |_|_|/|
        |/| | | |
        | | | * |   E
        | |_|/|\ \
        |/| |/ / /
        | | | | /
        | | | |/
        | | | * D
        | |_|/
        |/| |
        | | * C
        | |/
        |/|
        | * B
        |/
        * A

Is there a particular reason for wanting to include this test case? What 
particular combination of states is it designed to test? (My guess is that it 
includes an octopus merge where the original test does not.) I'd be happy to 
add it at the appropriate point in the history if it's adding coverage not 
provided by the other tests.

Reply via email to