path: root/tests
diff options
authorIan Jackson <>2019-07-17 13:28:06 +0100
committerIan Jackson <>2019-07-17 13:33:01 +0100
commit5cecc26a9bb8f6478443fad2909ed0a3203a719d (patch)
tree689a90493696ec6b8672d1504eba8792a35f585d /tests
parentfdccbe592d6095c1f77fb25714e163c07ddd5342 (diff) printcmd: Print in one go
Sometimes this message is used to report failure of `git fetch' etc. But when such operations fail, they may interleave output from the remote git, which typically prints fatal: The remote end hung up unexpectedly (referring to the local end as the `remote' end, from its point of view), after the the local end printed its message and failed. This sets up a race between's printcmd and the message from the remote. If we're really unlucky, the remote's message interrupts the output from printcmd. We can avoid the within-line interleaving - at least, the interruption of our message - by printing the whole message in one go, so do that. (Strictly, the approach we use here only ensures that the message appears in a single write(2) call if it fits in the stdio buffer.) One of our test cases (tagupl) depends on this message not being split and has a small chance of failing without this fix. Signed-off-by: Ian Jackson <>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions