Re: [PATCH v3] rebase: add a config option for --no-fork-point
- From
Denton Liu <liu.denton@gmail.com>
- Date
- Feb 23, 2021, 07:32 UTC
- Message-ID
- <YDSvhEBh8YeCblpa@generichostname>
- In-Reply-To
- <20210223071840.44267-1-alexhenrie24@gmail.com>
Hi Alex,
On Tue, Feb 23, 2021 at 12:18:40AM -0700, Alex Henrie wrote:
Show 19 quoted lines
> @@ -77,4 +81,35 @@ test_expect_success 'git rebase --fork-point with ambigous refname' ' > test_must_fail git rebase --fork-point --onto D one > ' > > +test_expect_success '--fork-point and --root both given' ' > + test_must_fail git rebase --fork-point --root 2>err && > + test_i18ngrep "cannot combine" err > +' > + > +test_expect_success 'rebase.forkPoint set to false' ' > + test_config rebase.forkPoint false && > + do_test_rebase "G F C E D B A" > +' > + > +test_expect_success 'rebase.forkPoint set to false and then to true' ' > + test_config_global rebase.forkPoint false && > + test_config rebase.forkPoint true && > + do_test_rebase "G F E D B A" > +'
I don't think this test is quite necessary. In other parts of the code, we've already tested that local configs have priority over global configs. We can assume that config machinery works so we don't need to test it here.
Thanks, Denton
Show 20 quoted lines
> + > +test_expect_success 'rebase.forkPoint set to false and command line says --fork-point' ' > + test_config rebase.forkPoint false && > + do_test_rebase "G F E D B A" --fork-point > +' > + > +test_expect_success 'rebase.forkPoint set to true and command line says --no-fork-point' ' > + test_config rebase.forkPoint true && > + do_test_rebase "G F C E D B A" --no-fork-point > +' > + > +test_expect_success 'rebase.forkPoint set to true and --root given' ' > + test_config rebase.forkPoint true && > + git rebase --root > +' > + > test_done > -- > 2.30.1 >