editorconfig: provide editor settings for Git developers
[gitweb.git] / t / t4001-diff-rename.sh
index a07816d5605f30ccb7f7ce6fe83288fff535538c..c16486a9d41a125610e6280a79e958ebbb792653 100755 (executable)
@@ -138,6 +138,18 @@ test_expect_success 'favour same basenames over different ones' '
        test_i18ngrep "renamed: .*path1 -> subdir/path1" out
 '
 
+test_expect_success 'test diff.renames=true for git status' '
+       git -c diff.renames=true status >out &&
+       test_i18ngrep "renamed: .*path1 -> subdir/path1" out
+'
+
+test_expect_success 'test diff.renames=false for git status' '
+       git -c diff.renames=false status >out &&
+       test_i18ngrep ! "renamed: .*path1 -> subdir/path1" out &&
+       test_i18ngrep "new file: .*subdir/path1" out &&
+       test_i18ngrep "deleted: .*[^/]path1" out
+'
+
 test_expect_success 'favour same basenames even with minor differences' '
        git show HEAD:path1 | sed "s/15/16/" > subdir/path1 &&
        git status >out &&
@@ -168,7 +180,7 @@ test_expect_success 'setup for many rename source candidates' '
        git add "path??" &&
        test_tick &&
        git commit -m "hundred" &&
-       (cat path1; echo new) >new-path &&
+       (cat path1 && echo new) >new-path &&
        echo old >>path1 &&
        git add new-path path1 &&
        git diff -l 4 -C -C --cached --name-status >actual 2>actual.err &&