summaryrefslogtreecommitdiff
path: root/t/t7800-difftool.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-08-12 16:16:57 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-08-12 16:16:57 (GMT)
commit9b601eafd1437df2e11b032bfbfd1ac5d32d3290 (patch)
treefa93de54b9cce0e537da90bd947e817f9af6cd43 /t/t7800-difftool.sh
parentf4fd6276619dfe7cf9a024730ca65b1bd0b3492b (diff)
parent32b8c581ecf35e73bebe2c6e9f6de617807b7f91 (diff)
downloadgit-9b601eafd1437df2e11b032bfbfd1ac5d32d3290.zip
git-9b601eafd1437df2e11b032bfbfd1ac5d32d3290.tar.gz
git-9b601eafd1437df2e11b032bfbfd1ac5d32d3290.tar.bz2
Merge branch 'jk/difftool-in-subdir' into maint
"git difftool <paths>..." 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
Diffstat (limited to 't/t7800-difftool.sh')
-rwxr-xr-xt/t7800-difftool.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh
index 42a2929..2974900 100755
--- a/t/t7800-difftool.sh
+++ b/t/t7800-difftool.sh
@@ -412,6 +412,20 @@ run_dir_diff_test 'difftool --dir-diff from subdirectory' '
)
'
+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 &&