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 <john@keeping.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
John Keeping committed
Sep 5, 2015 at 14:12 UTC
da568b66f1b481998bee3a2569739ca1302fd65c
1 file changed
+4
-4
t/t7800-difftool.sh
+4
-4
@@ -492,12 +492,12 @@ test_expect_success PERL 'difftool --no-symlinks detects conflict ' '
492
493
test_expect_success PERL 'difftool properly honors gitlink and core.worktree' '
494
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
+ '\'' &&
499
(
500
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
- '\'' &&
501
echo good >expect &&
502
git difftool --tool=checktrees --dir-diff HEAD~ >actual &&
503
test_cmp expect actual