Henning Schild <[email protected]> writes:
>> > + unset GIT_COMMITTER_EMAIL &&
>> > + git config user.email [email protected] &&
>> > + git config user.signingkey "" &&
>> > + test_must_fail git push --signed dst noop ff +noff &&
>>
>> This is OK for a test that is known to be always at the end, but
>> also forbids others to further update this script to add more tests
>> at the end, as the standard setting of environment is blown away
>> (the config is probably OK, but test_config to arrange them to be
>> cleaned up would have been nicer), which is not very nice. I think
>> it should be easy to fix it when it becomes necessary, but at the
>> same time if it is easy to fix, then probably we shouldn't introduce
>> a breakage in the first place, so I am on the fence.
>
> Switched to test_config, this is all coming from copying the previous
> tests, which i left as is.
I was specifically talking about the unsetting of GIT_COMMITTER_EMAIL,
not the configuration variables.
An easy way to try one step without the environment without
affecting later tests would be to run the above in a subshell,
perhaps like
test_config user.email ... &&
test_config user.signingkey "" &&
(
safe_unset GIT_COMMITTER_EMAIL &&
test_must_fail git push --signed ...
) &&