From f0522c931958b7dccca733229254f2e37f0ef20c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 5 Nov 2007 17:30:39 -0500 Subject: support git commit being run in a subdir Store the toplevel directory of the repo in the pre-commit hook, and cd to there. This is not ideal, but good enough. --- init.d/40git-pre-commit-hook | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'init.d/40git-pre-commit-hook') diff --git a/init.d/40git-pre-commit-hook b/init.d/40git-pre-commit-hook index cf96c1e..88eb581 100755 --- a/init.d/40git-pre-commit-hook +++ b/init.d/40git-pre-commit-hook @@ -10,7 +10,7 @@ else # pre-commit hook for etckeeper. Calls etckeeper-pre-commit to store metadata # and do sanity checks. set -e -etckeeper-pre-commit +etckeeper-pre-commit `pwd` EOF chmod +x .git/hooks/pre-commit fi -- cgit v1.2.3