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

Re: [PATCH v2 2/4] rebase: add tests for --no-rebase-merges

From
PWPhillip Wood <phillip.wood123@gmail.com>
Date
Feb 21, 2023, 11:00 UTC
Message-ID
<24be0c50-9dfa-e9d9-9d78-1b993832884b@dunelm.org.uk>
In-Reply-To
<20230221055805.210951-2-alexhenrie24@gmail.com>
Hi Alex
Thanks for adding some tests,
On 21/02/2023 05:58, Alex Henrie wrote:
Show 18 quoted lines
> Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
> ---
>   t/t3430-rebase-merges.sh | 25 +++++++++++++++++++++++++
>   1 file changed, 25 insertions(+)
> 
> diff --git a/t/t3430-rebase-merges.sh b/t/t3430-rebase-merges.sh
> index fa2a06c19f..e0d910c229 100755
> --- a/t/t3430-rebase-merges.sh
> +++ b/t/t3430-rebase-merges.sh
> @@ -250,6 +250,31 @@ test_expect_success 'with a branch tip that was cherry-picked already' '
>   	EOF
>   '
>   
> +test_expect_success 'do not rebase merges unless asked to' '
> +	git checkout -b rebase-merges-default E &&
> +	before="$(git rev-parse --verify HEAD)" &&
> +	test_tick &&
> +	git rebase --rebase-merges C &&
I don't quite follow what this part of the test is for
Show 19 quoted lines
> +	test_cmp_rev HEAD $before &&
> +	test_tick &&
> +	git rebase C &&
> +	test_cmp_graph C.. <<-\EOF
> +	* B
> +	* D
> +	o C
> +	EOF
> +'
> +
> +test_expect_success '--no-rebase-merges countermands --rebase-merges' '
> +	git checkout -b no-rebase-merges E &&
> +	git rebase --rebase-merges --no-rebase-merges C &&
> +	test_cmp_graph C.. <<-\EOF
> +	* B
> +	* D
> +	o C
> +	EOF
> +'

This test looks good. I think we could probably have just this second test and squash this into the previous patch - improving the documentation and test coverage for --no-rebase-merges would make a nice self-contained commit.

Best Wishes
Phillip
>   test_expect_success 'do not rebase cousins unless asked for' '
>   	git checkout -b cousins main &&
>   	before="$(git rev-parse --verify HEAD)" &&
Previous: Alex HenrieNext: Alex Henrie
Message 3 of 17 in “rebase: document the --no-rebase-merges option”
  1. 1/4 rebase: document the --no-rebase-merges optionAlex Henrie, Feb 21, 2023
  2. 2/4 rebase: add tests for --no-rebase-mergesAlex Henrie, Feb 21, 2023
  3. Phillip WoodFeb 21, 2023
  4. Alex HenrieFeb 22, 2023
  5. Phillip WoodFeb 22, 2023
  6. Alex HenrieFeb 23, 2023
  7. 3/4 rebase: stop accepting --rebase-merges=""Alex Henrie, Feb 21, 2023
  8. Phillip WoodFeb 21, 2023
  9. Alex HenrieFeb 22, 2023
  10. Alex HenrieFeb 22, 2023
  11. Phillip WoodFeb 22, 2023
  12. Junio C HamanoFeb 22, 2023
  13. Alex HenrieFeb 22, 2023
  14. 4/4 rebase: add a config option for --rebase-mergesAlex Henrie, Feb 21, 2023
  15. Phillip WoodFeb 21, 2023
  16. Alex HenrieFeb 22, 2023
  17. Phillip WoodFeb 21, 2023

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.