Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Some Commit Messages Scare git-rev-list

From: Darrin Thompson <hidden>
Date: 2016-06-15 22:42:23

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help