Skip to content

Tell Git where to find reference-transaction hooks

Patrick Steinhardt requested to merge pks-reftx-hooks-path into master

The WithRefTxHook() function has the purpose of setting up any Git commands which may potentially update any references such that they can use the reference-transaction hook. While it's already passing in most of the required environment variables, it doesn't in fact tell Git where it shall look for any hooks. As a result, Git wouldn't ever execute them at all.

Fix the issue by configuring core.HooksPath as a global Git option. Note that while this change will cause us to execute hooks a lot more frequently, it shouldn't in fact cause any additional transactions to be used. This is due to the fact that we don't yet pass transaction or Praefect server info to the hook.

Merge request reports