Skip to content

Commit a7cae29

Browse files
rybakgitster
authored andcommitted
t1300: don't create unused files
Three tests in t1300-config.sh check that "git config --get" barfs when syntax errors are present in the config file. The tests redirect standard output and standard error of "git config --get" to files, "actual" and "error" correspondingly. They assert presence of an error message in file "error". However, these tests don't use file "actual" for assertions. Don't redirect standard output of "git config --get" to file "actual" in t1300-config.sh to avoid creating unnecessary files. Signed-off-by: Andrei Rybak <[email protected]> Reviewed-by: Elijah Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6fc68e7 commit a7cae29

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

t/t1300-config.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1575,7 +1575,7 @@ test_expect_success 'barf on syntax error' '
15751575
[section]
15761576
key garbage
15771577
EOF
1578-
test_must_fail git config --get section.key >actual 2>error &&
1578+
test_must_fail git config --get section.key 2>error &&
15791579
test_i18ngrep " line 3 " error
15801580
'
15811581

@@ -1585,7 +1585,7 @@ test_expect_success 'barf on incomplete section header' '
15851585
[section
15861586
key = value
15871587
EOF
1588-
test_must_fail git config --get section.key >actual 2>error &&
1588+
test_must_fail git config --get section.key 2>error &&
15891589
test_i18ngrep " line 2 " error
15901590
'
15911591

@@ -1595,7 +1595,7 @@ test_expect_success 'barf on incomplete string' '
15951595
[section]
15961596
key = "value string
15971597
EOF
1598-
test_must_fail git config --get section.key >actual 2>error &&
1598+
test_must_fail git config --get section.key 2>error &&
15991599
test_i18ngrep " line 3 " error
16001600
'
16011601

0 commit comments

Comments
 (0)