On Mon, Apr 23, 2018 at 11:39:49PM +0000, brian m. carlson wrote: > 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 <sandals@xxxxxxxxxxxxxxxxxxxx> > --- > git-filter-branch.sh | 4 +++- > git-rebase--interactive.sh | 4 +++- > templates/hooks--pre-commit.sample | 2 +- > 3 files changed, 7 insertions(+), 3 deletions(-) > > diff --git a/git-filter-branch.sh b/git-filter-branch.sh > index 64f21547c1..ccceaf19a7 100755 > --- a/git-filter-branch.sh > +++ b/git-filter-branch.sh > @@ -11,6 +11,8 @@ > # The following functions will also be available in the commit filter: > > functions=$(cat << \EOF > +EMPTY_TREE=$(git hash-object -t tree /dev/null) All scripts (except those example hooks) must source git-sh-setup. Should we define this in there instead? -- Duy