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

Re: [PATCH v4 7/7] gpg-interface t: extend the existing GPG tests with GPGSM

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 18, 2018, 17:06 UTC
Message-ID
<xmqqbmb4lbhh.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20180718123617.55acfd3b@md1pvb1c.ad001.siemens.net>
Henning Schild <henning.schild@siemens.com> writes:
Show 16 quoted lines
>> > +	unset GIT_COMMITTER_EMAIL &&
>> > +	git config user.email hasnokey@nowhere.com &&
>> > +	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 ...
	) &&
Previous: Henning SchildNext: Henning Schild
Message 15 of 24 in “X509 (gpgsm) commit signing support”
  1. 0/7 X509 (gpgsm) commit signing supportHenning Schild, Jul 17, 2018
  2. 2/7 t/t7510: check the validation of the new config gpg.formatHenning Schild, Jul 17, 2018
  3. Junio C HamanoJul 17, 2018
  4. Henning SchildJul 18, 2018
  5. 2/7 t/t7510: check the validation of the new config gpg.formatHenning Schild, Jul 18, 2018
  6. 4/7 gpg-interface: do not hardcode the key string len anymoreHenning Schild, Jul 17, 2018
  7. Junio C HamanoJul 17, 2018
  8. 3/7 gpg-interface: introduce an abstraction for multiple gpg formatsHenning Schild, Jul 17, 2018
  9. Junio C HamanoJul 17, 2018
  10. 5/7 gpg-interface: introduce new config to select per gpg format programHenning Schild, Jul 17, 2018
  11. 1/7 gpg-interface: add new config to select how to sign a commitHenning Schild, Jul 17, 2018
  12. 7/7 gpg-interface t: extend the existing GPG tests with GPGSMHenning Schild, Jul 17, 2018
  13. Junio C HamanoJul 17, 2018
  14. Henning SchildJul 18, 2018
  15. Junio C HamanoJul 18, 2018
  16. t/t5534: do not unset GIT_COMMITTER_EMAIL for other testsHenning Schild, Jul 19, 2018
  17. Henning SchildJul 19, 2018
  18. Junio C HamanoJul 19, 2018
  19. Henning SchildJul 20, 2018
  20. Taylor BlauJul 19, 2018
  21. 7/7 gpg-interface t: extend the existing GPG tests with GPGSMHenning Schild, Jul 18, 2018
  22. 7/7 gpg-interface t: extend the existing GPG tests with GPGSMHenning Schild, Jul 20, 2018
  23. Junio C HamanoJul 20, 2018
  24. 6/7 gpg-interface: introduce new signature format "x509" using gpgsmHenning Schild, Jul 17, 2018

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.