wt-status: print to s->fp, not stdout
authorMartin Ågren <martin.agren@gmail.com>
Sun, 27 Sep 2020 13:15:42 +0000 (15:15 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sun, 27 Sep 2020 21:21:47 +0000 (14:21 -0700)
commit8f7e3de0970c419688f23f505b5cb7a9690d9b09
tree869e39e185d0b822f6517cb1a7e60e94617c3de0
parentb1f1ade87be595b5854c82850658c80465fdb16b
wt-status: print to s->fp, not stdout

We pass around a `FILE *` in the `struct wt_status` and almost always
print to it. But in a few places, we write to `stdout` instead, either
explicitly through `fprintf(stdout, ...)` or implicitly with
`printf(...)` (and a few `putchar(...)`).

Always be explicit about writing to `s->fp`. To the best of my
understanding, this never mattered in practice because these spots are
involved in various forms of `git status` which always end up at
standard output anyway. When we do write to another file, it's because
we're creating a commit message template, and these code paths aren't
involved.

But let's be consistent to help future readers and avoid future bugs.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
wt-status.c