test-lib*.sh: set GIT_CEILING_DIRECTORIES
commitb1ccbbbf64ccad56aa7d666ae1ceb70c19228b5e
authorKyle J. McKay <mackyle@gmail.com>
Sun, 5 Mar 2017 03:03:53 +0000 (4 19:03 -0800)
committerKyle J. McKay <mackyle@gmail.com>
Sun, 5 Mar 2017 03:03:53 +0000 (4 19:03 -0800)
treea52b7c719ef2c5ef62fa8dc01d2e2a66e13cdbcb
parentcfee8664ebf414c85c11c04c7503913f0744e843
test-lib*.sh: set GIT_CEILING_DIRECTORIES

Set, export and cache GIT_CEILING_DIRECTORIES to make sure
that running tests cannot accidentally find the git directory
of the actual Git repository containing the sources.

Without this and without using a --root option, if the
TEST_NO_CREATE_REPO variable is set to a non-empty value Git
would happily find the repository containing the sources.

That could be very bad indeed.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
t/test-lib-main.sh
t/test-lib.sh