diff: fix infinite loop with --color-moved --ignore-space-change
[gitweb.git] / t / t4015-diff-whitespace.sh
index c3b697411ab16a0dc21ce7579046765ccbeddfbd..66cad4d629bf19cfcba23c452a7d35b7322f8205 100755 (executable)
@@ -1406,4 +1406,13 @@ test_expect_success 'move detection with submodules' '
        test_cmp expect decoded_actual
 '
 
+test_expect_success 'move detection with whitespace changes' '
+       test_when_finished "git reset --hard" &&
+       test_seq 10 >test &&
+       git add test &&
+       sed s/3/42/ <test >test.tmp &&
+       mv test.tmp test &&
+       git -c diff.colormoved diff --ignore-space-change -- test
+'
+
 test_done