summaryrefslogtreecommitdiff
path: root/t/t7800-difftool.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-11-03 15:13:01 -0800
committerJunio C Hamano <gitster@pobox.com>2015-11-03 15:13:02 -0800
commitc253b82e42d8e6673917efb431479f8a9165de76 (patch)
treefe52d891f207817b92a0893b1fbb57a9dc541567 /t/t7800-difftool.sh
parentc5d9418ecdffe6e71a83ba1a5940d2cf2bf4f7e3 (diff)
parentcfe2d4be9126f03d8ca198f9da36762cdf59b52f (diff)
downloadgit-c253b82e42d8e6673917efb431479f8a9165de76.tar.gz
Merge branch 'da/difftool'
The code to prepare the working tree side of temporary directory for the "dir-diff" feature forgot that symbolic links need not be copied (or symlinked) to the temporary area, as the code already special cases and overwrites them. Besides, it was wrong to try computing the object name of the target of symbolic link, which may not even exist or may be a directory. * da/difftool: difftool: ignore symbolic links in use_wt_file
Diffstat (limited to 't/t7800-difftool.sh')
-rwxr-xr-xt/t7800-difftool.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh
index 48c6e2bc83..ec8bc8c765 100755
--- a/t/t7800-difftool.sh
+++ b/t/t7800-difftool.sh
@@ -504,4 +504,23 @@ test_expect_success PERL 'difftool properly honors gitlink and core.worktree' '
)
'
+test_expect_success PERL,SYMLINKS 'difftool --dir-diff symlinked directories' '
+ git init dirlinks &&
+ (
+ cd dirlinks &&
+ git config diff.tool checktrees &&
+ git config difftool.checktrees.cmd "echo good" &&
+ mkdir foo &&
+ : >foo/bar &&
+ git add foo/bar &&
+ test_commit symlink-one &&
+ ln -s foo link &&
+ git add link &&
+ test_commit symlink-two &&
+ echo good >expect &&
+ git difftool --tool=checktrees --dir-diff HEAD~ >actual &&
+ test_cmp expect actual
+ )
+'
+
test_done