git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
> 
Previous: Alex HenrieNext: Junio C Hamano
Message 2 of 7 in “rebase: add a config option for --no-fork-point”
  1. rebase: add a config option for --no-fork-pointAlex Henrie, Feb 23, 2021
  2. Denton LiuFeb 23, 2021
  3. Junio C HamanoFeb 23, 2021
  4. Martin ÅgrenFeb 24, 2021
  5. Martin ÅgrenFeb 24, 2021
  6. Junio C HamanoFeb 24, 2021
  7. Alex HenrieFeb 24, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.