Merge branch 'en/t3031-title-fix'
[gitweb.git] / templates / hooks--pre-commit.sample
index 586e3bf94da1a2d69a061fe98aa1604f9223280b..6a756416384c210ada2631f17862f5c01fffa478 100755 (executable)
@@ -12,11 +12,11 @@ then
        against=HEAD
 else
        # Initial commit: diff against an empty tree object
-       against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
+       against=$(git hash-object -t tree /dev/null)
 fi
 
 # If you want to allow non-ASCII filenames set this variable to true.
-allownonascii=$(git config hooks.allownonascii)
+allownonascii=$(git config --bool hooks.allownonascii)
 
 # Redirect output to stderr.
 exec 1>&2