Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-05-23 08:38:23 +0300
committerJunio C Hamano <gitster@pobox.com>2018-05-23 08:38:23 +0300
commit1e174fdbe6b0bea58d20e451ca66a1bbb5829307 (patch)
treee919fa5a15255d9d87fb2ad5d01eb31e5c1b0e7d /t
parent02d11bb5c6d5487b0bc7a2d89bbc48c81cc4b471 (diff)
parentdc6b1d92ca9c0c538daa244e3910bb8b2a50d959 (diff)
Merge branch 'em/status-rename-config'
"git status" learned to pay attention to UI related diff configuration variables such as diff.renames. * em/status-rename-config: wt-status: use settings from git_diff_ui_config
Diffstat (limited to 't')
-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 a07816d560..bf4030371a 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 &&