git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Jeff King <peff@peff.net>
Date
Feb 22, 2012, 20:51 UTC
Message-ID
<20120222205108.GC6781@sigill.intra.peff.net>
In-Reply-To
<a795f6dca5e7c3fc5f9212becda4a46116c502b7.1329939233.git.trast@student.ethz.ch>
On Wed, Feb 22, 2012 at 08:34:22PM +0100, Thomas Rast wrote:
Show 7 quoted lines
> 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
Previous: Junio C Hamano
Message 11 of 11 in “bundle: put strbuf_readline_fd in strbuf.c with adjustments”
  1. 1/2 bundle: put strbuf_readline_fd in strbuf.c with adjustmentsThomas Rast, Feb 22, 2012
  2. 2/2 bundle: use a strbuf to scan the log for boundary commitsThomas Rast, Feb 22, 2012
  3. Junio C HamanoFeb 22, 2012
  4. Thomas RastFeb 22, 2012
  5. Junio C HamanoFeb 22, 2012
  6. Jeff KingFeb 22, 2012
  7. Jeff KingFeb 22, 2012
  8. Johannes SixtFeb 22, 2012
  9. Junio C HamanoFeb 23, 2012
  10. Junio C HamanoFeb 23, 2012
  11. Jeff KingFeb 22, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.