Re: [PATCH 2/9] t7601: add tests of interactions with multiple merge heads and config

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Elijah Newren via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes:

> +test_expect_failure 'Multiple heads does not warn about fast forwarding' '
> +	git reset --hard c1 &&
> +	git pull . c2 c3 2>err &&
> +	test_i18ngrep ! "Pulling without specifying how to reconcile" err
> +'

This does not look like "warning about fast-forwarding".

But more importantly, are we sure we want to expect this outcome?

We are at c1 and try to integrate with c2 and c3 at the same time,
neither of which is a descendant of c1.

We know that the only possible action is to create an octopus in
this case, and that it is pretty much fundamental (i.e. it is not
like "rebase" with further development will be able to handle this
case).  I however do not know if it is also obvious to total newbies
who haven't even chosen between merge and rebase.  I can see them
complaining "why didn't I get asked to choose between rebase and
merge" if we went ahead and created an octopus merge, especially the
ones who would choose pull.rebase=yes once they learned Git a bit
more.

> +test_expect_success 'Cannot fast-forward with multiple heads' '
> +	git reset --hard c0 &&
> +	test_must_fail git -c pull.ff=only pull . c1 c2 c3 2>err &&
> +	test_i18ngrep ! "Pulling without specifying how to reconcile" err &&
> +	test_i18ngrep "Not possible to fast-forward, aborting" err
> +'

This one looks sensible to me.

> +test_expect_success 'Cannot rebase with multiple heads' '
> +	git reset --hard c0 &&
> +	test_must_fail git -c pull.rebase=true pull . c1 c2 c3 2>err &&
> +	test_i18ngrep ! "Pulling without specifying how to reconcile" err &&
> +	test_i18ngrep "Cannot rebase onto multiple branches." err
> +'

This one, too.

Thanks.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux