From: Junio C Hamano Date: Mon, 8 Aug 2016 21:48:39 +0000 (-0700) Subject: Merge branch 'jk/difftool-in-subdir' X-Git-Tag: v2.10.0-rc0~43 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/7647537e3e8f263306e22cb22b4f4f7b09589b19?ds=inline;hp=-c Merge branch 'jk/difftool-in-subdir' "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 --- 7647537e3e8f263306e22cb22b4f4f7b09589b19 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