Taylor Blau <me@xxxxxxxxxxxx> writes: >> > + git init repo && >> > + test_when_finished "rm -fr repo" && >> >> nit: test_when_finished should be the first line of the test. > > The "rm-then-init-then-test_when_finished" is an (unfortunate) pattern > extended throughout t5326, mostly that some tests don't clean up "repo" > after deleting and recreating it. I do not think it is so bad to be defensive to "prepare it cleanly enough so that I would not be affected". So "rm -fr repo && git init repo" I would fully support. "init && test_when_finished" is totally indefensible. It should be the other way around. > But it's easy enough to just use a separate repository, and avoid > removing it altogether. Thanks for the suggestion! Those who run tests in a batch without "-i" would have more material to study and find breakages if you did so. I agree that is probably something worth doing (unless in narrow corner cases where each test repository consumes unusual amount of storage or somethinglike that).