hooks: add a post-commit hook
commitb262b772591bc5dcd6a2fcb620b3aa59af84ee44
authorKyle J. McKay <mackyle@gmail.com>
Sun, 31 Dec 2017 04:21:13 +0000 (30 20:21 -0800)
committerKyle J. McKay <mackyle@gmail.com>
Sun, 31 Dec 2017 04:21:13 +0000 (30 20:21 -0800)
tree4f144089cd3d3d20a96abd5abb04f44359e05437
parent437fce20fba9ae976150e6976202d604dee90af2
hooks: add a post-commit hook

Under normal Girocco operations a post-commit hook will never need
to be run under any circumstances for any normal Girocco operations.

However, if linked working trees are in use or even, gasp, the
Girocco repository isn't actually bare, commits could be taking
place outside Girocco's control.

If the $Girocco::Config::autogchack has been activated, these will
eventually get noticed automatically at some point.

However, the most common way commits would be added and escape the
$autogchack detection mechanism would be via the simple "git commit"
command.

Provide a post-commit hook to catch this and run the same $autogchack
logic if that has been enabled.  As a nice bonus it will also cause
a "mini" gc to be requested should one be needed.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Girocco/Config.pm
Girocco/Project.pm
hooks/post-commit [new file with mode: 0755]
install.sh
toolbox/update-all-hooks.sh