This scripts exhibits some odd behavior. Apparently git-rev-list
mishandles commit messages which do not end in a newline. This as best I
can tell this is a problem introduced since 1.1.5.
Here is a script to reproduce the problem:
rm -rf git-test
mkdir git-test
cd git-test
git-init-db
echo hello > hello
git-add hello
# send scary message to git-commit -F -
echo -n "test commit" | git-commit -F - -a
echo world > world
git-add world
git-update-index --add world
treeid=$(git-write-tree)
# send scary message directly to git-commit-tree
commitid=$(echo -n "another-test" | git-commit-tree $treeid -p HEAD)
git-update-ref HEAD $commitid
# see the wreckage
git-rev-list --pretty HEAD
Running gitk will also show the problem.
--
Darrin