diff mbox series

[1/5] t3400: demonstrate failure with format.useAutoBase

Message ID a1741e54346a387a65e272f0210118ce81475358.1574820308.git.liu.denton@gmail.com (mailing list archive)
State New, archived
Headers show
Series rebase: fix breakage with `format.useAutoBase` | expand

Commit Message

Denton Liu Nov. 27, 2019, 2:09 a.m. UTC
Ever since bb52995f3e (format-patch: introduce format.useAutoBase
configuration, 2016-04-26), `git rebase` has been broken when
`format.useAutoBase = true`. Demonstrate that failure here.

Reported-by: Christian Biesinger <cbiesinger@google.com>
Signed-off-by: Denton Liu <liu.denton@gmail.com>
---
 t/t3400-rebase.sh | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Eric Sunshine Nov. 27, 2019, 2:26 a.m. UTC | #1
On Tue, Nov 26, 2019 at 9:09 PM Denton Liu <liu.denton@gmail.com> wrote:
> Ever since bb52995f3e (format-patch: introduce format.useAutoBase
> configuration, 2016-04-26), `git rebase` has been broken when
> `format.useAutoBase = true`. Demonstrate that failure here.

What specifically does "broken" mean here?

> Reported-by: Christian Biesinger <cbiesinger@google.com>
> Signed-off-by: Denton Liu <liu.denton@gmail.com>
> ---
> diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
> @@ -159,6 +159,12 @@ test_expect_success 'fail when upstream arg is missing and not configured' '
> +test_expect_failure 'rebase works with format.useAutoBase' '
> +       test_config format.useAutoBase true &&
> +       git checkout topic &&
> +       git rebase master
> +'

Having read both the commit message and the test itself, I'm not wiser
about what is actually "broken" or what this is demonstrating.
Junio C Hamano Nov. 30, 2019, 5:25 p.m. UTC | #2
Eric Sunshine <sunshine@sunshineco.com> writes:

> On Tue, Nov 26, 2019 at 9:09 PM Denton Liu <liu.denton@gmail.com> wrote:
>> Ever since bb52995f3e (format-patch: introduce format.useAutoBase
>> configuration, 2016-04-26), `git rebase` has been broken when
>> `format.useAutoBase = true`. Demonstrate that failure here.
>
> What specifically does "broken" mean here?
>
>> Reported-by: Christian Biesinger <cbiesinger@google.com>
>> Signed-off-by: Denton Liu <liu.denton@gmail.com>
>> ---
>> diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
>> @@ -159,6 +159,12 @@ test_expect_success 'fail when upstream arg is missing and not configured' '
>> +test_expect_failure 'rebase works with format.useAutoBase' '
>> +       test_config format.useAutoBase true &&
>> +       git checkout topic &&
>> +       git rebase master
>> +'
>
> Having read both the commit message and the test itself, I'm not wiser
> about what is actually "broken" or what this is demonstrating.

True.

The tests must be crystal clear what kind of brokenness it is
demonstrating, not just "this test is expected to fail", especially
when the "expect failure in one step, fix and flip expectation in a
separate step" pattern is used; otherwise it becomes doubly puzzling.

Thanks.
diff mbox series

Patch

diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
index ab18ac5f28..ca99e8c6c4 100755
--- a/t/t3400-rebase.sh
+++ b/t/t3400-rebase.sh
@@ -159,6 +159,12 @@  test_expect_success 'fail when upstream arg is missing and not configured' '
 	test_must_fail git rebase
 '
 
+test_expect_failure 'rebase works with format.useAutoBase' '
+	test_config format.useAutoBase true &&
+	git checkout topic &&
+	git rebase master
+'
+
 test_expect_success 'default to common base in @{upstream}s reflog if no upstream arg' '
 	git checkout -b default-base master &&
 	git checkout -b default topic &&