On Mon, Jul 7, 2025 at 9:42 PM Junio C Hamano <gitster@xxxxxxxxx> wrote: > > Usman Akinyemi <usmanakinyemi202@xxxxxxxxx> writes: > > > The test 'verify-commit does not crash with -h' checks that > > the command exits cleanly with usage information, both inside and > > outside of a repository. > > > > Move this test from "t/t7510-signed-commit.sh" to > > "t1517-outside-repo.sh" since it better fits with tests that check > > command behavior outside a repository. > > > > Suggested-by: Patrick Steinhardt <ps@xxxxxx> > > Signed-off-by: Usman Akinyemi <usmanakinyemi202@xxxxxxxxx> > > --- > > t/t1517-outside-repo.sh | 7 +++++++ > > t/t7510-signed-commit.sh | 7 ------- > > 2 files changed, 7 insertions(+), 7 deletions(-) > Hi Junio, > My first reaction to this series was "heh, you can cut it both ways; > a test to see how a command A works outside a repository can be a > test about command A (which is the way how the current test suite > looks at) or a test about being outside a repository (which this > topic tries to move into). > Actually, I felt the same while trying to create the patch series. I was going to just send a single patch before as an RFC. > But this may be an example that shows why it is more error prone to > partition across "inside? outside?" axis. These particular ones may > be limited to "should exit without crashing and without doing > anything fancy when asked to give a short help", so this move may > happen to be able to lose the GPG prerequisite without breaking > anything. > > But in the longer run, we are very much likely that we'd want to > test something that needs things that require prerequisites (like > "do this only where XYZ is installed") but ought to work outside a > repository, which means t1517 would need to pull in things like > lib-gpg.sh only because it has a few tests about verify-blah > command. These tend to accumulate over time. I understand the concern and I felt we should at least decide where to put the "verify -h" because, right now, we have some of them in the t1517 and also some in their respective test files. So, there are some little hiccups there. It will also create a headache for someone who is trying to place the test(deciding if they should put it in the t1517 as some test or inside their respective test as some others). Also, Ayush(GSoC) is also working currently around this part. Is it something that is worth creating a new test file for, I will probably say that is a viable solution or better still we should put the test inside their respective test files. What do you think ? > > So, I dunno. >