From: Junio C Hamano Date: Tue, 3 Nov 2015 23:13:01 +0000 (-0800) Subject: Merge branch 'da/difftool' X-Git-Tag: v2.7.0-rc0~47 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/c253b82e42d8e6673917efb431479f8a9165de76?hp=-c 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 --- c253b82e42d8e6673917efb431479f8a9165de76 diff --combined t/t7800-difftool.sh index 48c6e2bc83,a771cf77f5..ec8bc8c765 --- a/t/t7800-difftool.sh +++ b/t/t7800-difftool.sh @@@ -492,16 -492,35 +492,35 @@@ test_expect_success PERL 'difftool --no test_expect_success PERL 'difftool properly honors gitlink and core.worktree' ' git submodule add ./. submod/ule && + test_config -C submod/ule diff.tool checktrees && + test_config -C submod/ule difftool.checktrees.cmd '\'' + test -d "$LOCAL" && test -d "$REMOTE" && echo good + '\'' && ( cd submod/ule && - test_config diff.tool checktrees && - test_config difftool.checktrees.cmd '\'' - test -d "$LOCAL" && test -d "$REMOTE" && echo good - '\'' && echo good >expect && git difftool --tool=checktrees --dir-diff HEAD~ >actual && test_cmp expect actual ) ' + 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