Merge branch 'js/color-on-windows-comment' into maint
[gitweb.git] / t / t7800-difftool.sh
index ff7a9e968f4dde078a131ee65306ae6784e8faa5..42a2929835b5c77e5b3031ce56ad1243afb56971 100755 (executable)
@@ -419,11 +419,34 @@ 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
        echo "$f"
-       readlink "$2/$f"
+       ls -ld "$2/$f" | sed -e 's/.* -> //'
 done >actual
 EOF