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
This commit is contained in:
@ -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 &&
|
||||
|
Reference in New Issue
Block a user