On Fri, Jan 24, 2025 at 12:56 AM Patrick Steinhardt <ps@xxxxxx> wrote: > On Sun, Jan 12, 2025 at 05:51:22PM +0100, Bence Ferdinandy wrote: > > +test_expect_success "fetch test remote HEAD in bare repository" ' > > + cd "$D" && > > + git init --bare barerepo && > > + cd barerepo && > > The `cd` needs to happen in a subshell. ALso, the same comment here > regarding whether we want to have `test_when_finished` to clean up > state. By way of explanation regarding `cd` in a subshell, see [*]. [*]: https://lore.kernel.org/git/CAPig+cRsAPp1APNJ7W337UNtunETr+Lnn-RcGrAXEFUhN1APyA@xxxxxxxxxxxxxx/