Skip to content

Commit fa73a58

Browse files
peffgitster
authored andcommitted
t7063: hide stderr from setup inside prereq
When t7063 starts, it runs "update-index --untracked-cache" to see if we support the untracked cache. Its output goes straight to stderr, even if the test is not run with "-v". Let's wrap it in a prereq that will hide the output by default, but show it with "-v". Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent aeb6f8b commit fa73a58

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

t/t7063-status-untracked-cache.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@ avoid_racy() {
88
sleep 1
99
}
1010

11-
git update-index --untracked-cache
1211
# It's fine if git update-index returns an error code other than one,
1312
# it'll be caught in the first test.
14-
if test $? -eq 1; then
13+
test_lazy_prereq UNTRACKED_CACHE '
14+
{ git update-index --untracked-cache; ret=$?; } &&
15+
test $ret -ne 1
16+
'
17+
18+
if ! test_have_prereq UNTRACKED_CACHE; then
1519
skip_all='This system does not support untracked cache'
1620
test_done
1721
fi

0 commit comments

Comments
 (0)