From: Junio C Hamano Date: Fri, 12 Aug 2016 16:16:57 +0000 (-0700) Subject: Merge branch 'jk/difftool-in-subdir' into maint X-Git-Tag: v2.9.3~1 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/9b601eafd1437df2e11b032bfbfd1ac5d32d3290?ds=inline;hp=-c Merge branch 'jk/difftool-in-subdir' into maint "git difftool ..." started in a subdirectory failed to interpret the paths relative to that directory, which has been fixed. * jk/difftool-in-subdir: difftool: use Git::* functions instead of passing around state difftool: avoid $GIT_DIR and $GIT_WORK_TREE difftool: fix argument handling in subdirs --- 9b601eafd1437df2e11b032bfbfd1ac5d32d3290 diff --combined t/t7800-difftool.sh index 42a2929835,cb25480e1f..2974900578 --- a/t/t7800-difftool.sh +++ b/t/t7800-difftool.sh @@@ -412,6 -412,20 +412,20 @@@ run_dir_diff_test 'difftool --dir-diff ) ' + run_dir_diff_test 'difftool --dir-diff from subdirectory with GIT_DIR set' ' + ( + GIT_DIR=$(pwd)/.git && + export GIT_DIR && + GIT_WORK_TREE=$(pwd) && + export GIT_WORK_TREE && + cd sub && + git difftool --dir-diff $symlinks --extcmd ls \ + branch -- sub >output && + grep sub output && + ! grep file output + ) + ' + run_dir_diff_test 'difftool --dir-diff when worktree file is missing' ' test_when_finished git reset --hard && rm file2 && @@@ -446,7 -460,7 +460,7 @@@ write_script .git/CHECK_SYMLINKS <<\EO for f in file file2 sub/sub do echo "$f" - readlink "$2/$f" + ls -ld "$2/$f" | sed -e 's/.* -> //' done >actual EOF