-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanup rebase signoff tests #1713
Cleanup rebase signoff tests #1713
Conversation
Perform the setup in a dedicated test so the later tests can be run independently. Also avoid running git upstream of a pipe and take advantage of test_commit. Signed-off-by: Phillip Wood <[email protected]>
Using a helper function makes the tests shorter and avoids running "git cat-file" upstream of a pipe. Signed-off-by: Phillip Wood <[email protected]>
/submit |
Submitted as [email protected] To fetch this version into
To fetch this version to local tag
|
|
||
git config alias.rbs "rebase --signoff" | ||
' | ||
|
||
# We configure an alias to do the rebase --signoff so that | ||
# on the next subtest we can show that --no-signoff overrides the alias |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the Git mailing list, Junio C Hamano wrote (reply to this):
"Phillip Wood via GitGitGadget" <[email protected]> writes:
> From: Phillip Wood <[email protected]>
>
> Using a helper function makes the tests shorter and avoids running "git
> cat-file" upstream of a pipe.
Nice.
|
||
git config alias.rbs "rebase --signoff" | ||
' | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the Git mailing list, Junio C Hamano wrote (reply to this):
"Phillip Wood via GitGitGadget" <[email protected]> writes:
> From: Phillip Wood <[email protected]>
>
> This test file assumes the "apply" backend is the default which is not
> the case since 2ac0d6273f (rebase: change the default backend from "am"
> to "merge", 2020-02-15). Make sure the "apply" backend is tested by
> specifying it explicitly.
Hmph, doesn't this lose coverage for the merge backend, though?
> Signed-off-by: Phillip Wood <[email protected]>
> ---
> t/t3428-rebase-signoff.sh | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/t/t3428-rebase-signoff.sh b/t/t3428-rebase-signoff.sh
> index 133e54114f6..1bebd1ce74a 100755
> --- a/t/t3428-rebase-signoff.sh
> +++ b/t/t3428-rebase-signoff.sh
> @@ -38,8 +38,8 @@ test_expect_success 'setup' '
>
> # We configure an alias to do the rebase --signoff so that
> # on the next subtest we can show that --no-signoff overrides the alias
> -test_expect_success 'rebase --signoff adds a sign-off line' '
> - git rbs HEAD^ &&
> +test_expect_success 'rebase --apply --signoff adds a sign-off line' '
> + git rbs --apply HEAD^ &&
> test_commit_message HEAD expected-signed
> '
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the Git mailing list, [email protected] wrote (reply to this):
Hi Junio
On 10/04/2024 00:08, Junio C Hamano wrote:
> "Phillip Wood via GitGitGadget" <[email protected]> writes:
> >> From: Phillip Wood <[email protected]>
>>
>> This test file assumes the "apply" backend is the default which is not
>> the case since 2ac0d6273f (rebase: change the default backend from "am"
>> to "merge", 2020-02-15). Make sure the "apply" backend is tested by
>> specifying it explicitly.
> > Hmph, doesn't this lose coverage for the merge backend, though?
I don't think so, we had coverage for the merge backend from the other tests before 2ac0d6273f as all of the other tests in this file use the merge backend. We're no longer testing "--signoff" without specifying some other option that selects a backend but it seems unlikely that we could break that without breaking one of the other tests.
Best Wishes
Phillip
> >> Signed-off-by: Phillip Wood <[email protected]>
>> ---
>> t/t3428-rebase-signoff.sh | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/t/t3428-rebase-signoff.sh b/t/t3428-rebase-signoff.sh
>> index 133e54114f6..1bebd1ce74a 100755
>> --- a/t/t3428-rebase-signoff.sh
>> +++ b/t/t3428-rebase-signoff.sh
>> @@ -38,8 +38,8 @@ test_expect_success 'setup' '
>> >> # We configure an alias to do the rebase --signoff so that
>> # on the next subtest we can show that --no-signoff overrides the alias
>> -test_expect_success 'rebase --signoff adds a sign-off line' '
>> - git rbs HEAD^ &&
>> +test_expect_success 'rebase --apply --signoff adds a sign-off line' '
>> + git rbs --apply HEAD^ &&
>> test_commit_message HEAD expected-signed
>> '
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the Git mailing list, Junio C Hamano wrote (reply to this):
[email protected] writes:
>> Hmph, doesn't this lose coverage for the merge backend, though?
>
> I don't think so, we had coverage for the merge backend from the other
> tests before 2ac0d6273f as all of the other tests in this file use the
> merge backend. We're no longer testing "--signoff" without specifying
> some other option that selects a backend but it seems unlikely that we
> could break that without breaking one of the other tests.
OK, so we have "rebase --merge --signoff" tested elsewhere and we
are replacing "rebase --signoff" with "rebase --apply --signoff"?
Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the Git mailing list, [email protected] wrote (reply to this):
On 10/04/2024 15:22, Junio C Hamano wrote:
> [email protected] writes:
> >>> Hmph, doesn't this lose coverage for the merge backend, though?
>>
>> I don't think so, we had coverage for the merge backend from the other
>> tests before 2ac0d6273f as all of the other tests in this file use the
>> merge backend. We're no longer testing "--signoff" without specifying
>> some other option that selects a backend but it seems unlikely that we
>> could break that without breaking one of the other tests.
> > OK, so we have "rebase --merge --signoff" tested elsewhere and we
> are replacing "rebase --signoff" with "rebase --apply --signoff"?
Exactly
> Thanks.
>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the Git mailing list, Junio C Hamano wrote (reply to this):
[email protected] writes:
> On 10/04/2024 15:22, Junio C Hamano wrote:
>> [email protected] writes:
>>
>>>> Hmph, doesn't this lose coverage for the merge backend, though?
>>>
>>> I don't think so, we had coverage for the merge backend from the other
>>> tests before 2ac0d6273f as all of the other tests in this file use the
>>> merge backend. We're no longer testing "--signoff" without specifying
>>> some other option that selects a backend but it seems unlikely that we
>>> could break that without breaking one of the other tests.
>> OK, so we have "rebase --merge --signoff" tested elsewhere and we
>> are replacing "rebase --signoff" with "rebase --apply --signoff"?
>
> Exactly
Perhaps we can write that in the log message to help the next person
who reads the patch? Something like...
t3428: restore coverage for "apply" backend
This test file assumes the "apply" backend is the default which is
not the case since 2ac0d6273f (rebase: change the default backend
from "am" to "merge", 2020-02-15). The way "merge" backend honors
"--signoff" is already tested elsewhere, so make sure the "apply"
backend is tested by specifying it explicitly.
Signed-off-by: Phillip Wood <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the Git mailing list, [email protected] wrote (reply to this):
On 10/04/2024 17:45, Junio C Hamano wrote:
> [email protected] writes:
> >> On 10/04/2024 15:22, Junio C Hamano wrote:
>>> [email protected] writes:
>>>
>>>>> Hmph, doesn't this lose coverage for the merge backend, though?
>>>>
>>>> I don't think so, we had coverage for the merge backend from the other
>>>> tests before 2ac0d6273f as all of the other tests in this file use the
>>>> merge backend. We're no longer testing "--signoff" without specifying
>>>> some other option that selects a backend but it seems unlikely that we
>>>> could break that without breaking one of the other tests.
>>> OK, so we have "rebase --merge --signoff" tested elsewhere and we
>>> are replacing "rebase --signoff" with "rebase --apply --signoff"?
>>
>> Exactly
> > Perhaps we can write that in the log message to help the next person
> who reads the patch? Something like...
> > t3428: restore coverage for "apply" backend
> > This test file assumes the "apply" backend is the default which is
> not the case since 2ac0d6273f (rebase: change the default backend
> from "am" to "merge", 2020-02-15). The way "merge" backend honors
> "--signoff" is already tested elsewhere, so make sure the "apply"
> backend is tested by specifying it explicitly.
> > Signed-off-by: Phillip Wood <[email protected]>
> Signed-off-by: Junio C Hamano <[email protected]>
Sounds good, I'll send a re-roll
Thanks
Phillip
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the Git mailing list, Phillip Wood wrote (reply to this):
On 12/04/2024 10:33, [email protected] wrote:
> On 10/04/2024 17:45, Junio C Hamano wrote:
>> [email protected] writes:
>> Perhaps we can write that in the log message to help the next person
>> who reads the patch? Something like...
>>
>> t3428: restore coverage for "apply" backend
>> This test file assumes the "apply" backend is the default which is
>> not the case since 2ac0d6273f (rebase: change the default backend
>> from "am" to "merge", 2020-02-15). The way "merge" backend honors
>> "--signoff" is already tested elsewhere, so make sure the "apply"
>> backend is tested by specifying it explicitly.
>> Signed-off-by: Phillip Wood <[email protected]>
>> Signed-off-by: Junio C Hamano <[email protected]>
> > Sounds good, I'll send a re-roll
Oh, it looks like this hit next yesterday
Phillip
This branch is now known as |
This patch series was integrated into seen via git@b9d7312. |
This patch series was integrated into seen via git@f35b092. |
This patch series was integrated into seen via git@f4c219c. |
This patch series was integrated into next via git@3c40516. |
This test file assumes the "apply" backend is the default which is not the case since 2ac0d62 (rebase: change the default backend from "am" to "merge", 2020-02-15). The way "merge" backend honors "--signoff" is already tested elsewhere, so make sure the "apply" backend is tested by specifying it explicitly. Signed-off-by: Phillip Wood <[email protected]>
b45af37
to
7d796c7
Compare
User |
This patch series was integrated into seen via git@97b69ff. |
This patch series was integrated into seen via git@dfb36b3. |
There was a status update in the "New Topics" section about the branch Test cleanup. Will merge to 'master'. source: <[email protected]> |
This patch series was integrated into seen via git@26b5e59. |
This patch series was integrated into seen via git@a7c9e28. |
This patch series was integrated into seen via git@93e3f9d. |
This patch series was integrated into master via git@93e3f9d. |
This patch series was integrated into next via git@93e3f9d. |
Closed via 93e3f9d. |
This series cleans up the tests for "git rebase --signoff" in preparation for extending them and fixing a couple of bugs in a future series. The cleanups are:
cc: Phillip Wood [email protected]