All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phillip Wood <phillip.wood123@gmail.com>
To: Alex Henrie <alexhenrie24@gmail.com>,
	git@vger.kernel.org, tao@klerks.biz, gitster@pobox.com,
	newren@gmail.com, phillip.wood123@gmail.com,
	Johannes.Schindelin@gmx.de
Subject: Re: [PATCH v2 2/4] rebase: add tests for --no-rebase-merges
Date: Tue, 21 Feb 2023 11:00:00 +0000	[thread overview]
Message-ID: <24be0c50-9dfa-e9d9-9d78-1b993832884b@dunelm.org.uk> (raw)
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:
> 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

> +	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)" &&

  reply	other threads:[~2023-02-21 11:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-21  5:58 [PATCH v2 1/4] rebase: document the --no-rebase-merges option Alex Henrie
2023-02-21  5:58 ` [PATCH v2 2/4] rebase: add tests for --no-rebase-merges Alex Henrie
2023-02-21 11:00   ` Phillip Wood [this message]
2023-02-22  1:37     ` Alex Henrie
2023-02-22 10:16       ` Phillip Wood
2023-02-23  5:35         ` Alex Henrie
2023-02-21  5:58 ` [PATCH v2 3/4] rebase: stop accepting --rebase-merges="" Alex Henrie
2023-02-21 10:55   ` Phillip Wood
2023-02-22  1:38     ` Alex Henrie
2023-02-22  1:41       ` Alex Henrie
2023-02-22 10:18       ` Phillip Wood
2023-02-22 23:08         ` Junio C Hamano
2023-02-22 23:33           ` Alex Henrie
2023-02-21  5:58 ` [PATCH v2 4/4] rebase: add a config option for --rebase-merges Alex Henrie
2023-02-21 10:46   ` Phillip Wood
2023-02-22  1:41     ` Alex Henrie
2023-02-21 11:01 ` [PATCH v2 1/4] rebase: document the --no-rebase-merges option Phillip Wood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=24be0c50-9dfa-e9d9-9d78-1b993832884b@dunelm.org.uk \
    --to=phillip.wood123@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=alexhenrie24@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=newren@gmail.com \
    --cc=phillip.wood@dunelm.org.uk \
    --cc=tao@klerks.biz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.