From: Jonas Fonseca Date: Fri, 09 Nov 2007 01:12:14 GMT Subject: [BUG] git-rebase fails when a commit message contains a diff Message-ID: <20071109011214.GA5903@diku.dk> I have concocted a test that illustrates the problem: patch below. The problem is that the patches in .dotest are not properly formatted to make it easy to distinguish commit message from commit diff. When running the test git-rebase fails with: Applying Test message with diff in it error: config: does not exist in index fatal: sha1 information is lacking or useless (config). Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. Patch failed at 0004. By modifying the test below, a similar problem related with handling of the end-of-message marker (---\n) can be exposed. A commit message that contains this marker and text afterwards ends up only having the text preceeding the marker. diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh index 95e33b5..75babdb 100755 --- a/t/t3400-rebase.sh +++ b/t/t3400-rebase.sh @@ -83,4 +83,25 @@ test_expect_success 'rebase a single mode change' ' GIT_TRACE=1 git rebase master ' +cat >commitdiff-message < W && + git add W && + git commit -F commitdiff-message && + git rebase master +' + test_done -- Jonas Fonseca