Skip to content

Commit da568b6

Browse files
johnkeepinggitster
authored andcommitted
t7800: don't use test_config in a subshell
Use the new "-C" option to test_config to change the configuration in the submodule from the top level of the test so that it can be unset correctly when the test finishes. Signed-off-by: John Keeping <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5fafc07 commit da568b6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

t/t7800-difftool.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -492,12 +492,12 @@ test_expect_success PERL 'difftool --no-symlinks detects conflict ' '
492492

493493
test_expect_success PERL 'difftool properly honors gitlink and core.worktree' '
494494
git submodule add ./. submod/ule &&
495+
test_config -C submod/ule diff.tool checktrees &&
496+
test_config -C submod/ule difftool.checktrees.cmd '\''
497+
test -d "$LOCAL" && test -d "$REMOTE" && echo good
498+
'\'' &&
495499
(
496500
cd submod/ule &&
497-
test_config diff.tool checktrees &&
498-
test_config difftool.checktrees.cmd '\''
499-
test -d "$LOCAL" && test -d "$REMOTE" && echo good
500-
'\'' &&
501501
echo good >expect &&
502502
git difftool --tool=checktrees --dir-diff HEAD~ >actual &&
503503
test_cmp expect actual

0 commit comments

Comments
 (0)