From 03a7f388dafaee0aa084144efe7a8f9c151e5221 Mon Sep 17 00:00:00 2001 From: "brian m. carlson" Date: Wed, 2 May 2018 00:26:08 +0000 Subject: Update shell scripts to compute empty tree object ID Several of our shell scripts hard-code the object ID of the empty tree. To avoid any problems when changing hashes, compute this value on startup of the script. For performance, store the value in a variable and reuse it throughout the life of the script. Signed-off-by: brian m. carlson Signed-off-by: Junio C Hamano --- templates/hooks--pre-commit.sample | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'templates') diff --git a/templates/hooks--pre-commit.sample b/templates/hooks--pre-commit.sample index 68d62d5446..6a75641638 100755 --- a/templates/hooks--pre-commit.sample +++ b/templates/hooks--pre-commit.sample @@ -12,7 +12,7 @@ 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. -- cgit v1.2.3