summaryrefslogtreecommitdiff
path: root/t/t4001-diff-rename.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t4001-diff-rename.sh')
-rwxr-xr-xt/t4001-diff-rename.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t4001-diff-rename.sh b/t/t4001-diff-rename.sh
index a07816d..bf40303 100755
--- a/t/t4001-diff-rename.sh
+++ b/t/t4001-diff-rename.sh
@@ -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 &&