update-all-config.pl: confound confounding core.hooksPath
commit37da5ae2e9b9b950692c5c741c8a2667592b6888
authorKyle J. McKay <mackyle@gmail.com>
Sun, 31 Dec 2017 02:57:51 +0000 (30 18:57 -0800)
committerKyle J. McKay <mackyle@gmail.com>
Sun, 31 Dec 2017 02:57:51 +0000 (30 18:57 -0800)
treecb0a202ac9d551294e0f3f40da44b1b25b0fce36
parent9284233a533d81c01cdfe19910c14adbfc09367a
update-all-config.pl: confound confounding core.hooksPath

Girocco now always sets core.hooksPath to protect against the
confounding abomination that is the core.hooksPath implementation.

Instead of just always blindly forcing it to be set to point
at $reporoot/_global/hooks also tolerate it pointing at
$reporoot/<current_project_name>.git/hooks as well.

It's safe to point at the repository itself because that
will always be accessible in the chroot for the same reason
the $reporoot/_global/hooks directory is.

Additionally, should repository-specific hooks be necessary
or desirable for some reason, pointing at the repository's
hooks directory allows this.

We are, however, careful to make sure that the value stored
is changed to exactly "$reporoot/<current_project_name>.git/hooks"
in this case (if that's not what's actually there due to various
symlinks and or other alternate path mechanisms) in order to
guarantee it can be accessed from inside the chroot jail.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
toolbox/update-all-config.pl