aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.githooks
diff options
context:
space:
mode:
authorLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-04-21 01:23:26 +0100
committerLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-04-21 01:23:26 +0100
commit0cd53c5bbad1d9d16e3e65929f9d730dd9ca4ca8 (patch)
treeccc28501de2145e21a5d91944df42c67a1d9312f /.githooks
parent1e2576f15a21d0144df2ab16ab7f61f496167140 (diff)
downloaddotfiles-0cd53c5bbad1d9d16e3e65929f9d730dd9ca4ca8.tar.gz
dotfiles-0cd53c5bbad1d9d16e3e65929f9d730dd9ca4ca8.tar.bz2
dotfiles-0cd53c5bbad1d9d16e3e65929f9d730dd9ca4ca8.zip
fix: pass -S . to chezmoi so apply/status work from any CWD
Without an explicit source, chezmoi defaults to ~/.local/share/chezmoi which doesn't exist on this setup. The post-commit hook uses git rev-parse so it works even if the hook is run from a subdirectory.
Diffstat (limited to '.githooks')
-rwxr-xr-x.githooks/post-commit2
1 files changed, 1 insertions, 1 deletions
diff --git a/.githooks/post-commit b/.githooks/post-commit
index 83acb4f..d2d7eba 100755
--- a/.githooks/post-commit
+++ b/.githooks/post-commit
@@ -1,2 +1,2 @@
#!/bin/sh
-chezmoi apply
+chezmoi apply -S "$(git rev-parse --show-toplevel)"