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

Re: Problem listing GIT repository with accents

From
Jeff King <peff@peff.net>
Date
Feb 1, 2010, 17:40 UTC
Message-ID
<20100201174045.GA5756@coredump.intra.peff.net>
In-Reply-To
<7v3a1k50sw.fsf@alter.siamese.dyndns.org>
On Mon, Feb 01, 2010 at 09:21:51AM -0800, Junio C Hamano wrote:
Show 12 quoted lines
> Unless we document "this function is to C-quote a (portion of a) string,
> either to the end or up to the given length", however, future callers may
> incorrectly assume that with length the function can be fed anything and
> would C-quote that piece of memory.  The argument name "const char *name"
> already suggests that is not an arbitrary binary rubbish, changing that to
> "str" would probably make that a bit stronger documentation, or we could
> explicitly say "this is a (early part of a) NUL-terminated string" in a
> comment.
> 
> But your one-liner patch would actually be a smaller change than any of
> them and makes the whole problem disappear; wouldn't it be a far better
> solution?

Sure, if you are going to bother to document it to future-proof against new callers, you might as well just make it more flexible with my one-liner. I don't think it will impact the behavior of any existing callers either way.

I was just going to not bother, but perhaps while we have spent some brain cycles on it, it is better to just fix it. Either way is fine with me.

-Peff
Previous: Junio C Hamano
Message 8 of 8 in “Problem listing GIT repository with accents”
  1. Ellié Computing Open Source ProgramFeb 1, 2010
  2. Jeff KingFeb 1, 2010
  3. Jeff KingFeb 1, 2010
  4. Johannes SixtFeb 1, 2010
  5. Jeff KingFeb 1, 2010
  6. Jeff KingFeb 1, 2010
  7. Junio C HamanoFeb 1, 2010
  8. Jeff KingFeb 1, 2010

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.