From: Junio C Hamano Date: Wed, 04 Oct 2023 18:24:10 GMT Subject: Re: [PATCH] test-lib: make sure TEST_DIRECTORY has no trailing slash Message-ID: In-Reply-To: <20231004194046+0200.353534-stepnem@smrk.net> Štěpán Němec writes: > The $PWD inside the test is the trash directory, though, so that's not > the problematic $PWD with a trailing slash any more, so I guess this > problem can't really happen in a test that follows the '. ./test-lib.sh' > (which does cd -P "$TRASH_DIRECTORY") convention? Yeah, after the dot-include of test-lib.sh returns, everything should be safe. What happens inside test-lib.sh (and worse yet, inside future versions of that file) before that "cd -P" is what the extra-carefulness protects against.