]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t7800-difftool.sh
Merge branch 'jk/delta-islands-progress-fix' into maint
[thirdparty/git.git] / t / t7800-difftool.sh
index 48b74c04346eb061ed414dbb254543a11f87886f..6bac9ed180e7342b34401b2d6af9e83b4472f08d 100755 (executable)
@@ -348,7 +348,7 @@ test_expect_success 'difftool --extcmd cat arg1' '
 test_expect_success 'difftool --extcmd cat arg2' '
        echo branch >expect &&
        git difftool --no-prompt \
-               --extcmd sh\ -c\ \"cat\ \$2\" branch >actual &&
+               --extcmd sh\ -c\ \"cat\ \\\"\$2\\\"\" branch >actual &&
        test_cmp expect actual
 '
 
@@ -562,7 +562,7 @@ do
 done >actual
 EOF
 
-test_expect_success SYMLINKS 'difftool --dir-diff --symlink without unstaged changes' '
+test_expect_success SYMLINKS 'difftool --dir-diff --symlinks without unstaged changes' '
        cat >expect <<-EOF &&
        file
        $PWD/file
@@ -571,7 +571,7 @@ test_expect_success SYMLINKS 'difftool --dir-diff --symlink without unstaged cha
        sub/sub
        $PWD/sub/sub
        EOF
-       git difftool --dir-diff --symlink \
+       git difftool --dir-diff --symlinks \
                --extcmd "./.git/CHECK_SYMLINKS" branch HEAD &&
        test_cmp expect actual
 '
@@ -721,6 +721,16 @@ test_expect_success SYMLINKS 'difftool --dir-diff handles modified symlinks' '
        test_cmp expect actual
 '
 
+test_expect_success 'outside worktree' '
+       echo 1 >1 &&
+       echo 2 >2 &&
+       test_expect_code 1 nongit git \
+               -c diff.tool=echo -c difftool.echo.cmd="echo \$LOCAL \$REMOTE" \
+               difftool --no-prompt --no-index ../1 ../2 >actual &&
+       echo "../1 ../2" >expect &&
+       test_cmp expect actual
+'
+
 test_expect_success 'difftool --gui, --tool and --extcmd are mutually exclusive' '
        difftool_test_setup &&
        test_must_fail git difftool --gui --tool=test-tool &&