{"thread":{"id":"51888","subject":"[PATCH] t/helper: ignore only executable files","startedAt":"2019-09-20T09:36:15Z","lastAt":"2019-09-23T22:31:48Z","messageCount":2,"participants":["SZEDER Gábor","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"382647","messageId":"20190920093609.24935-1-szeder.dev@gmail.com","threadId":"51888","inReplyTo":null,"subject":"[PATCH] t/helper: ignore only executable files","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2019-09-20T09:36:09Z","receivedAt":"2019-09-20T09:36:15Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"This patch conceptually reverts 44103f4197 (t/helper: ignore\neverything but sources, 2017-12-12).  Back in those days we did have a\nlot of separate test helper executables under 't/helper', and its\n'.gitignore' did get out of sync every once in a while.\n\nSince then, however, most of those separate executables were\nintegrated into a single 'test-tool' command [1], and new test helpers\nare added as new subcommands, so the chances of that '.gitignore'\ngetting out of sync again are much lower.  And even if a contributor\nwere not careful enough and submits a patch that adds a new executable\nunder 't/helper' but forgets to update '.gitignore' accordingly, our\nCI builds would catch it in a timely manner [2].\n\nIgnoring everything but sources has the drawback that building an\nolder version of Git (e.g. during bisecting) creates all those\nexecutables, and after going back to e.g. current 'master' the usual\ncleanup commands like 'make clean' or 'git clean -fd' don't remove\nthem (the former doesn't know about them, and the latter doesn't\nremove ignored files).\n\nSo let's ignore only the executable files under 't/helper/, i.e.\n'test-tool' and the three other remaining executables that could not\nbe integrated into 'test-tool' (no need to ignore object files, as\nthey are already ignored by our toplevel '.gitignore').\n\n[1] The topic starting with efd71f8913 (t/helper: add an empty\n    test-tool program, 2018-03-24), and leading up to the merge commit\n    27f25845cf (Merge branch 'nd/combined-test-helper', 2018-04-11).\n\n[2] b92cb86ea1 (travis-ci: check that all build artifacts are\n    .gitignore-d, 2017-12-31)\n\nSigned-off-by: SZEDER Gábor <szeder.dev@gmail.com>\n---\n t/helper/.gitignore | 9 ++++-----\n 1 file changed, 4 insertions(+), 5 deletions(-)\n\ndiff --git a/t/helper/.gitignore b/t/helper/.gitignore\nindex 2bad28af92..48c7bb0bbb 100644\n--- a/t/helper/.gitignore\n+++ b/t/helper/.gitignore\n@@ -1,5 +1,4 @@\n-*\n-!*.sh\n-!*.[ch]\n-!*.gitignore\n-\n+/test-tool\n+/test-fake-ssh\n+/test-line-buffer\n+/test-svn-fe\n-- \n2.23.0.331.g4e51dcdf11\n\n"},{"id":"382806","messageId":"20190923223145.GB22645@sigill.intra.peff.net","threadId":"51888","inReplyTo":"20190920093609.24935-1-szeder.dev@gmail.com","subject":"Re: [PATCH] t/helper: ignore only executable files","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2019-09-23T22:31:46Z","receivedAt":"2019-09-23T22:31:48Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Sep 20, 2019 at 11:36:09AM +0200, SZEDER Gábor wrote:\n\n> Ignoring everything but sources has the drawback that building an\n> older version of Git (e.g. during bisecting) creates all those\n> executables, and after going back to e.g. current 'master' the usual\n> cleanup commands like 'make clean' or 'git clean -fd' don't remove\n> them (the former doesn't know about them, and the latter doesn't\n> remove ignored files).\n\nGood reasoning. I've definitely been bit by this before when manually\ntesting something (for some reason, I still haven't trained my fingers\nto type \"test-tool foo\" instead of \"test-foo\").\n\nA similar one that bites me sometimes is that modern t5801 will fail\nwith an old built version of git-remote-testgit. That one _is_ correctly\nhandled in .gitignore, but you do have to remember to run \"git clean\".\nBut that's the best we can do, I think, unless we want to make t5801\nmore paranoid about running the version from t/t5801/git-remote-testgit.\n\n> So let's ignore only the executable files under 't/helper/, i.e.\n> 'test-tool' and the three other remaining executables that could not\n> be integrated into 'test-tool' (no need to ignore object files, as\n> they are already ignored by our toplevel '.gitignore').\n\nSounds like the right solution, and the patch looks good to me.\n\n-Peff\n"}]}