"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Christian Weisgerber <naddy@mips.inka.de>
Subject:
rebase is missing a fflush(stdout)
To:
gameoftrees@openbsd.org
Date:
Sat, 1 Apr 2023 15:26:53 +0200

Download raw body.

Thread
When I try to rebase jca@'s jca/llvm15-12 branch on the latest
OpenBSD master, I correctly get a merge conflict.  I logged the
output of the whole rebase operation:

$ got rb llvm15 2>&1 | tee ../log

That produces some 11,200 lines.  Some 200 lines from the end,
splatted into another line of output, there's a "got: conflicts
must be resolved before rebasing can continue".  It's also thousands
of lines from the actual C conflict line.

Looking at cmd_rebase(), I see that "conflicts must be resolved
before rebasing can continue" should appear at the very end.  It's
issued to stderr, so written right away, while the other output
goes to stdout and is stuck in a buffer that is only written out
once got exits.  In short, cmd_rebase() or one of the functions it
calls is missing a fflush(stdout)... but I don't know where the
most logical place for that would be.

-- 
Christian "naddy" Weisgerber                          naddy@mips.inka.de