Thread (9 messages) flat view 9 messages, 6 authors, 2016-06-15

Re: [PATCH 1/2] bundle: put strbuf_readline_fd in strbuf.c with adjustments

From: Jeff King <hidden>
Date: 2016-06-15 22:53:07

On Wed, Feb 22, 2012 at 08:34:22PM +0100, Thomas Rast wrote:
The comment even said that it should eventually go there.  While at
it, match the calling convention and name of the function to the
strbuf_get*line family.  So it now is strbuf_getwholeline_fd.
[...]
 bundle.c |   21 ++-------------------
 strbuf.c |   16 ++++++++++++++++
 strbuf.h |    1 +
Nit: no update to Documentation/technical/api-strbuf.txt.

You might want to also mention that this will read() one byte at a time,
and is therefore only a good idea if you really care about the position
of the fd. Otherwise, fdopen() + strbuf_getwholeline() is much more
efficient.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help