Re: [PATCH] test-lib: set GIT_CEILING_DIRECTORIES to protect the surrounding repository
On Sat, Aug 28, 2021 at 12:56:24PM -0700, Carlo Arenas wrote:
Show 16 quoted lines
> On Sat, Aug 28, 2021 at 5:15 AM SZEDER Gábor <szeder.dev@gmail.com> wrote:
> > diff --git a/t/test-lib.sh b/t/test-lib.sh
> > index abcfbed6d6..a1e0182c2f 100644
> > --- a/t/test-lib.sh
> > +++ b/t/test-lib.sh
> > @@ -1343,7 +1343,8 @@ fi
> > GIT_TEMPLATE_DIR="$GIT_BUILD_DIR"/templates/blt
> > GIT_CONFIG_NOSYSTEM=1
> > GIT_ATTR_NOSYSTEM=1
> > -export PATH GIT_EXEC_PATH GIT_TEMPLATE_DIR GIT_CONFIG_NOSYSTEM GIT_ATTR_NOSYSTEM
> > +GIT_CEILING_DIRECTORIES="$GIT_BUILD_DIR"
>
> this wouldn't work as expected with --root and would be IMHO safer
> anyway if using instead
>
> GIT_CEILING_DIRECTORIES="$TRASH_DIRECTORY/.."
Thanks, I completely forgot about '--root'.