{"thread":{"id":"59992","subject":"[PATCH] t6300: fix setup with GPGSSH but without GPG","startedAt":"2023-07-16T08:17:43Z","lastAt":"2023-07-17T17:13:30Z","messageCount":4,"participants":["René Scharfe","Christian Couder","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"479557","messageId":"cbc22750-af93-9274-2ed4-6dfd356568e8@web.de","threadId":"59992","inReplyTo":null,"subject":"[PATCH] t6300: fix setup with GPGSSH but without GPG","fromName":"René Scharfe","fromEmail":"l.s.r@web.de","sentAt":"2023-07-16T08:17:35Z","receivedAt":"2023-07-16T08:17:43Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"In a test introduced by 26c9c03f0a (ref-filter: add new \"signature\"\natom, 2023-06-04) the file named \"file\" is added by a setup step that\nrequires GPG and modified by a second setup step that requires GPGSSH.\nSystems lacking the first prerequisite skip the initial setup step and\nthen \"git commit -a\" in the second one doesn't find the modified file.\nAdd it explicitly.\n\nSigned-off-by: René Scharfe <l.s.r@web.de>\n---\n t/t6300-for-each-ref.sh | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh\nindex 6e6ec852b5..1180c3254c 100755\n--- a/t/t6300-for-each-ref.sh\n+++ b/t/t6300-for-each-ref.sh\n@@ -1584,7 +1584,8 @@ test_expect_success GPGSSH 'setup for signature atom using ssh' '\n \ttest_config user.signingkey \"${GPGSSH_KEY_PRIMARY}\" &&\n \techo \"8\" >file &&\n \ttest_tick &&\n-\tgit commit -a -S -m \"file: 8\" &&\n+\tgit add file &&\n+\tgit commit -S -m \"file: 8\" &&\n \tgit tag eighth-signed-ssh\n '\n\n--\n2.41.0\n"},{"id":"479570","messageId":"CAP8UFD0pjX1Pz9bq+CqiR-M85KVOWdGnBvgQJ=NDA4voC2n30w@mail.gmail.com","threadId":"59992","inReplyTo":"cbc22750-af93-9274-2ed4-6dfd356568e8@web.de","subject":"Re: [PATCH] t6300: fix setup with GPGSSH but without GPG","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2023-07-17T06:33:10Z","receivedAt":"2023-07-17T06:33:28Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Sun, Jul 16, 2023 at 10:17 AM René Scharfe <l.s.r@web.de> wrote:\n>\n> In a test introduced by 26c9c03f0a (ref-filter: add new \"signature\"\n> atom, 2023-06-04) the file named \"file\" is added by a setup step that\n> requires GPG and modified by a second setup step that requires GPGSSH.\n> Systems lacking the first prerequisite skip the initial setup step and\n> then \"git commit -a\" in the second one doesn't find the modified file.\n> Add it explicitly.\n\nRight, acked!\n\nThanks!\n"},{"id":"479577","messageId":"xmqqwmyyik2o.fsf@gitster.g","threadId":"59992","inReplyTo":"cbc22750-af93-9274-2ed4-6dfd356568e8@web.de","subject":"Re: [PATCH] t6300: fix setup with GPGSSH but without GPG","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2023-07-17T16:22:55Z","receivedAt":"2023-07-17T16:23:18Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"René Scharfe <l.s.r@web.de> writes:\n\n> In a test introduced by 26c9c03f0a (ref-filter: add new \"signature\"\n> atom, 2023-06-04) the file named \"file\" is added by a setup step that\n> requires GPG and modified by a second setup step that requires GPGSSH.\n> Systems lacking the first prerequisite skip the initial setup step and\n> then \"git commit -a\" in the second one doesn't find the modified file.\n> Add it explicitly.\n>\n> Signed-off-by: René Scharfe <l.s.r@web.de>\n> ---\n>  t/t6300-for-each-ref.sh | 3 ++-\n>  1 file changed, 2 insertions(+), 1 deletion(-)\n\nThanks for good eyes.\n\nI guess a box without GPG is not so uncommon, and even such a box\ncan reasonably be expected to have SSH on it, so I would believe if\nthis was discovered on a real development box, but is that how you\nfound this?  Or have you invented a nice test helper that lets you\npick random set of prerequisites and try permutations of having and\nnot having them, or something nice like that?\n\nWill queue.\n\n> diff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh\n> index 6e6ec852b5..1180c3254c 100755\n> --- a/t/t6300-for-each-ref.sh\n> +++ b/t/t6300-for-each-ref.sh\n> @@ -1584,7 +1584,8 @@ test_expect_success GPGSSH 'setup for signature atom using ssh' '\n>  \ttest_config user.signingkey \"${GPGSSH_KEY_PRIMARY}\" &&\n>  \techo \"8\" >file &&\n>  \ttest_tick &&\n> -\tgit commit -a -S -m \"file: 8\" &&\n> +\tgit add file &&\n> +\tgit commit -S -m \"file: 8\" &&\n>  \tgit tag eighth-signed-ssh\n>  '\n>\n> --\n> 2.41.0\n"},{"id":"479581","messageId":"183f69ff-8b6b-80a5-4d25-d58d25ae5b5f@web.de","threadId":"59992","inReplyTo":"xmqqwmyyik2o.fsf@gitster.g","subject":"Re: [PATCH] t6300: fix setup with GPGSSH but without GPG","fromName":"René Scharfe","fromEmail":"l.s.r@web.de","sentAt":"2023-07-17T17:12:47Z","receivedAt":"2023-07-17T17:13:30Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Am 17.07.23 um 18:22 schrieb Junio C Hamano:\n> René Scharfe <l.s.r@web.de> writes:\n>\n>> In a test introduced by 26c9c03f0a (ref-filter: add new \"signature\"\n>> atom, 2023-06-04) the file named \"file\" is added by a setup step that\n>> requires GPG and modified by a second setup step that requires GPGSSH.\n>> Systems lacking the first prerequisite skip the initial setup step and\n>> then \"git commit -a\" in the second one doesn't find the modified file.\n>> Add it explicitly.\n>>\n>> Signed-off-by: René Scharfe <l.s.r@web.de>\n>> ---\n>>  t/t6300-for-each-ref.sh | 3 ++-\n>>  1 file changed, 2 insertions(+), 1 deletion(-)\n>\n> Thanks for good eyes.\n>\n> I guess a box without GPG is not so uncommon, and even such a box\n> can reasonably be expected to have SSH on it, so I would believe if\n> this was discovered on a real development box, but is that how you\n> found this?  Or have you invented a nice test helper that lets you\n> pick random set of prerequisites and try permutations of having and\n> not having them, or something nice like that?\n\nThe test actually did fail on my machine.\n\nRunning tests with all possible permutations of prerequisites would be\nnice, but sounds very expensive -- there must be billions of them!  But\nthere are only a few per test script, I imagine.  Collecting all found\nprerequisites for each script and providing a way to force-disable them\nindividually could make testing them all feasible.  Nice idea!\n\nRené\n"}]}