]> git.scottworley.com Git - pinch/blobdiff - git-pre-commit-hook
Fix a bash-ism in test.sh, which is #!/bin/sh
[pinch] / git-pre-commit-hook
index 7db6818fc588c12319dad91daa346aae73970c29..ce476144f4f5a6d9c2e7ed8a018b7b14b7692f73 100755 (executable)
@@ -17,6 +17,16 @@ D=$(mktemp -d)
 git checkout-index --prefix="$D/" -a
 pushd "$D"
 
-nix-shell --run ./test.sh
+# So we don't confuse the inner git invocations inside the tests with
+# the outer git invocation that's trying to commit a change.
+unset GIT_AUTHOR_DATE
+unset GIT_AUTHOR_EMAIL
+unset GIT_AUTHOR_NAME
+unset GIT_CONFIG_PARAMETERS
+unset GIT_EXEC_PATH
+unset GIT_INDEX_FILE
+unset GIT_PREFIX
+
+nix-shell --arg lint true --run './test.sh lint'
 
 popd