Skip to content

Commit

Permalink
Use --show-toplevel for reliable detection of git working dir
Browse files Browse the repository at this point in the history
  • Loading branch information
srid committed Apr 11, 2023
1 parent d2d0bac commit aa06ccf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/pre-commit.nix
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ in
elif ! ${git}/bin/git rev-parse --git-dir &> /dev/null; then
echo 1>&2 "WARNING: pre-commit-hooks.nix: .git not found; skipping installation."
else
GIT_WC=`${git}/bin/git rev-parse --git-dir`/..
GIT_WC=`${git}/bin/git rev-parse --show-toplevel`
# These update procedures compare before they write, to avoid
# filesystem churn. This improves performance with watch tools like lorri
Expand Down

0 comments on commit aa06ccf

Please sign in to comment.