From: Björn Gustavsson Date: Sun, 07 Feb 2010 08:10:12 GMT Subject: [PATCH] Add a test for a problem in "rebase --whitespace=fix" Message-ID: <4B6E7564.7040109@gmail.com> The command "git rebase --whitespace=fix HEAD~" is supposed to only clean up trailing whitespace, and the expectation is that it cannot fail. Unfortunately, if one commit adds a blank line at the end of a file and a subsequent commit adds more non-blank lines after the blank line, "git apply" (used indirectly by "git rebase") will fail to apply the patch of the second commit. Signed-off-by: Björn Gustavsson --- t/t3417-rebase-whitespace-fix.sh | 45 ++++++++++++++++++++++++++++++++++++++ 1 files changed, 45 insertions(+), 0 deletions(-) create mode 100755 t/t3417-rebase-whitespace-fix.sh diff --git a/t/t3417-rebase-whitespace-fix.sh b/t/t3417-rebase-whitespace-fix.sh new file mode 100755 index 0000000..55cbce7 --- /dev/null +++ b/t/t3417-rebase-whitespace-fix.sh @@ -0,0 +1,45 @@ +#!/bin/sh + +test_description='git rebase --whitespace=fix + +This test runs git rebase --whitespace=fix and make sure that it works. +' + +. ./test-lib.sh + +# prepare initial revision of "file" with a blank line at the end +cat >file <expect <second <