summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2016-06-06 14:27:37 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-06-06 14:27:37 -0700
commit389c3289cfa5bc0a232ad52df70fae1f6863d1a4 (patch)
tree15092587a7ff56f43c48ea3718800087277afc6b /t
parentMerge branch 'tb/core-eol-fix' into maint (diff)
parentdifftool: handle unmerged files in dir-diff mode (diff)
downloadtgif-389c3289cfa5bc0a232ad52df70fae1f6863d1a4.tar.xz
Merge branch 'da/difftool' into maint
"git difftool" learned to handle unmerged paths correctly in dir-diff mode. * da/difftool: difftool: handle unmerged files in dir-diff mode difftool: initialize variables for readability
Diffstat (limited to 't')
-rwxr-xr-xt/t7800-difftool.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh
index ff7a9e968f..7ce4cd753e 100755
--- a/t/t7800-difftool.sh
+++ b/t/t7800-difftool.sh
@@ -419,6 +419,29 @@ run_dir_diff_test 'difftool --dir-diff when worktree file is missing' '
grep file2 output
'
+run_dir_diff_test 'difftool --dir-diff with unmerged files' '
+ test_when_finished git reset --hard &&
+ test_config difftool.echo.cmd "echo ok" &&
+ git checkout -B conflict-a &&
+ git checkout -B conflict-b &&
+ git checkout conflict-a &&
+ echo a >>file &&
+ git add file &&
+ git commit -m conflict-a &&
+ git checkout conflict-b &&
+ echo b >>file &&
+ git add file &&
+ git commit -m conflict-b &&
+ git checkout master &&
+ git merge conflict-a &&
+ test_must_fail git merge conflict-b &&
+ cat >expect <<-EOF &&
+ ok
+ EOF
+ git difftool --dir-diff $symlinks -t echo >actual &&
+ test_cmp expect actual
+'
+
write_script .git/CHECK_SYMLINKS <<\EOF
for f in file file2 sub/sub
do