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

Re: [AGGREGATED PATCH] Fix in-place editing functions in convert.c

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Oct 5, 2007, 19:33 UTC
Message-ID
<alpine.LFD.0.999.0710051232300.23684@woody.linux-foundation.org>
In-Reply-To
<37fcd2780710051227n96d29a9v543831ca8292c862@mail.gmail.com>
On Fri, 5 Oct 2007, Dmitry Potapov wrote:
Show 6 quoted lines
> 
> On the other hand, I don't see what is the problem with using C string
> routines with it. ::data() returns a pointer and :capacity () returns
> allocated size of the buffer. ::resize() changes the size of the string.
> If you need a greater allocated size, you can use ::reserve().
> Or did I miss something?

No, you didn't miss anything. Except for the fact that the original point was that it's just a damn lot simpler and more straightforward to code just using "sb->buf" for the data. IOW, go back two or three emails in the thread.

		Linus
Previous: Dmitry PotapovNext: Pierre Habouzit
Message 14 of 18 in “Fix in-place editing in crlf_to_git and ident_to_git.”
  1. Fix in-place editing in crlf_to_git and ident_to_git.Pierre Habouzit, Oct 5, 2007
  2. Fix in-place editing functions in convert.cPierre Habouzit, Oct 5, 2007
  3. Johannes SixtOct 5, 2007
  4. Bernt HansenOct 5, 2007
  5. Linus TorvaldsOct 5, 2007
  6. Pierre HabouzitOct 5, 2007
  7. Sam RavnborgOct 5, 2007
  8. Pierre HabouzitOct 5, 2007
  9. Sam RavnborgOct 5, 2007
  10. Linus TorvaldsOct 5, 2007
  11. Sam RavnborgOct 5, 2007
  12. Linus TorvaldsOct 5, 2007
  13. Dmitry PotapovOct 5, 2007
  14. Linus TorvaldsOct 5, 2007
  15. Fix memory leak in apply_filter.Pierre Habouzit, Oct 5, 2007
  16. Fix memory leak in apply_filter.Pierre Habouzit, Oct 5, 2007
  17. Johannes SchindelinOct 5, 2007
  18. Pierre HabouzitOct 5, 2007

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.