branch: elpa/hyperdrive commit 6739080b9cbae8943dfaf7be616b7785c4ba6920 Author: Joseph Turner <jos...@ushin.org> Commit: Joseph Turner <jos...@ushin.org>
Meta: Track pre-commit hook to build the manual It is necessary to check git status since we only want to stage hyperdrive.texi when hyperdrive.org is also staged. If instead we relied on GNU Make's built-in timestamp comparison, `git add doc/hyperdrive.texi` would run when doc/hyperdrive.org is modified in the worktree but not among the files staged for commit. --- tracked-hooks/pre-commit | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tracked-hooks/pre-commit b/tracked-hooks/pre-commit new file mode 100755 index 0000000000..cea9539c16 --- /dev/null +++ b/tracked-hooks/pre-commit @@ -0,0 +1,5 @@ +#!/bin/sh +git status -s | \ + grep '^M doc/hyperdrive.org$' > /dev/null && \ + make doc && \ + git add doc/hyperdrive.texi