cvsclient: handle files which lack a trailing newline
Closed
requested to merge generated-differential-D6558-source into generated-differential-D6558-target
- Oct 27, 2021
-
-
Stefan Sperling authored
CVS uses \n as a protocol message separator, which forces us to read protocol message line-by-line. File content sent by the server has a length known and is transmitted in bytes. The server appends a final "ok\n" message (or perhaps an error message) when it is done sending file contents. Properly handle the case where this final message gets buffered along with file contents and is not delimited from file contents by \n because the file lacks a trailing newline. Previously, the final protocol message ended up being written out to file contents in this case. Found while testing ingestion of the GNU dino CVS repository from cvs.savannah.gnu.org/sources/dino.
d3b3344b
-