summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-08-08 21:48:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-08-08 21:48:39 (GMT)
commit7647537e3e8f263306e22cb22b4f4f7b09589b19 (patch)
treefc3ace2fe023a86be36d7f3438cd4644ffb5372d /t
parent768ededa9c4e804ead6d473d4fe3a8092a77b05c (diff)
parent32b8c581ecf35e73bebe2c6e9f6de617807b7f91 (diff)
downloadgit-7647537e3e8f263306e22cb22b4f4f7b09589b19.zip
git-7647537e3e8f263306e22cb22b4f4f7b09589b19.tar.gz
git-7647537e3e8f263306e22cb22b4f4f7b09589b19.tar.bz2
Merge branch 'jk/difftool-in-subdir'
"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')
-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 &&