git commit -m "added sub/sub" &&
echo test >>file &&
echo test >>sub/sub &&
- git add . &&
+ git add file sub/sub &&
git commit -m "modified both"
'
-test_expect_success PERL 'difftool -d' '
- git difftool -d --extcmd ls branch >output &&
+run_dir_diff_test () {
+ test_expect_success PERL "$1 --no-symlinks" "
+ symlinks=--no-symlinks &&
+ $2
+ "
+ test_expect_success PERL,SYMLINKS "$1 --symlinks" "
+ symlinks=--symlinks &&
+ $2
+ "
+}
+
+run_dir_diff_test 'difftool -d' '
+ git difftool -d $symlinks --extcmd ls branch >output &&
grep sub output &&
grep file output
'
-test_expect_success PERL 'difftool --dir-diff' '
- git difftool --dir-diff --extcmd ls branch >output &&
+run_dir_diff_test 'difftool --dir-diff' '
+ git difftool --dir-diff $symlinks --extcmd ls branch >output &&
grep sub output &&
grep file output
'
-test_expect_success PERL 'difftool --dir-diff ignores --prompt' '
- git difftool --dir-diff --prompt --extcmd ls branch >output &&
+run_dir_diff_test 'difftool --dir-diff ignores --prompt' '
+ git difftool --dir-diff $symlinks --prompt --extcmd ls branch >output &&
grep sub output &&
grep file output
'
-test_expect_success PERL 'difftool --dir-diff from subdirectory' '
+run_dir_diff_test 'difftool --dir-diff from subdirectory' '
(
cd sub &&
- git difftool --dir-diff --extcmd ls branch >output &&
+ git difftool --dir-diff $symlinks --extcmd ls branch >output &&
grep sub output &&
grep file output
)