#!/bin/sh
# simplegit-managed git hook. Forwards this invocation to the simplegit daemon
# hook bus via `simplegit hook`. The daemon exports SIMPLEGIT_BIN (absolute
# path to the simplegit binary) and SIMPLEGIT_ROOT (data root, where hook.sock
# lives). If SIMPLEGIT_BIN is unset -- the hook running outside the daemon --
# fail open (exit 0) so the git operation is never blocked by the event bus.
test -n "$SIMPLEGIT_BIN" || exit 0
exec "$SIMPLEGIT_BIN" hook --root="${SIMPLEGIT_ROOT:-}" fsmonitor-watchman "$@"
