{"thread":{"id":"58094","subject":"[PATCH] t6429: fix use of non-existent function","startedAt":"2022-07-01T05:20:09Z","lastAt":"2022-07-01T05:20:09Z","messageCount":1,"participants":["Elijah Newren via GitGitGadget"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"458336","messageId":"pull.1276.git.1656652799863.gitgitgadget@gmail.com","threadId":"58094","inReplyTo":null,"subject":"[PATCH] t6429: fix use of non-existent function","fromName":"Elijah Newren via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2022-07-01T05:19:59Z","receivedAt":"2022-07-01T05:20:09Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"From: Elijah Newren <newren@palantir.com>\n\nThis test had a line reading\n\n    ! test_file_is_empty actual\n\nwhich was meant to be\n\n    ! test_must_be_empty actual\n\nThe test worked despite the error, because even though\ntest_file_is_empty is a non-existent function, the '!' negated the\nreturn value and made it pass.  It'd be better to avoid the negation,\nso something like\n\n    test_file_not_empty actual\n\nwould be better, but perhaps it makes even more sense to specify the\nnumber of lines of expected output to make the test a bit tighter.\n\nReported-by: SZEDER Gábor <szeder.dev@gmail.com>\nSigned-off-by: Elijah Newren <newren@palantir.com>\n---\n    t6429: fix use of non-existent function\n    \n    This test had a line reading\n    \n    ! test_file_is_empty actual\n    \n    \n    which was meant to be\n    \n    ! test_must_be_empty actual\n    \n    \n    The test worked despite the error, because even though\n    test_file_is_empty is a non-existent function, the '!' negated the\n    return value and made it pass. It'd be better to avoid the negation, so\n    something like\n    \n    test_file_not_empty actual\n    \n    \n    would be better, but perhaps it makes even more sense to specify the\n    number of lines of expected output to make the test a bit tighter.\n    \n    Reported-by: SZEDER Gábor szeder.dev@gmail.com Signed-off-by: Elijah\n    Newren newren@palantir.com\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-1276%2Fnewren%2Fmerge-ort-restart-optim-fix-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1276/newren/merge-ort-restart-optim-fix-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/1276\n\n t/t6429-merge-sequence-rename-caching.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t6429-merge-sequence-rename-caching.sh b/t/t6429-merge-sequence-rename-caching.sh\nindex f2bc8a7d2a2..e1ce9199164 100755\n--- a/t/t6429-merge-sequence-rename-caching.sh\n+++ b/t/t6429-merge-sequence-rename-caching.sh\n@@ -760,7 +760,7 @@ test_expect_success 'avoid assuming we detected renames' '\n \t\ttest_must_fail git -c merge.renameLimit=1 rebase upstream &&\n \n \t\tgit ls-files -u >actual &&\n-\t\t! test_file_is_empty actual\n+\t\ttest_line_count = 2 actual\n \t)\n '\n \n\nbase-commit: e54793a95afeea1e10de1e5ad7eab914e7416250\n-- \ngitgitgadget\n"}]}