From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Johannes Sixt" <j.sixt@viscovery.net>,
"Ellié Computing Open Source Program"
<opensource@elliecomputing.com>,
"Pierre Habouzit" <madcoder@debian.org>,
git@vger.kernel.org
Subject: Re: Problem listing GIT repository with accents
Date: Mon, 1 Feb 2010 12:40:45 -0500 [thread overview]
Message-ID: <20100201174045.GA5756@coredump.intra.peff.net> (raw)
In-Reply-To: <7v3a1k50sw.fsf@alter.siamese.dyndns.org>
On Mon, Feb 01, 2010 at 09:21:51AM -0800, Junio C Hamano wrote:
> 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
prev parent reply other threads:[~2010-02-01 17:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-01 10:48 Problem listing GIT repository with accents Ellié Computing Open Source Program
2010-02-01 11:32 ` Jeff King
2010-02-01 12:19 ` Jeff King
2010-02-01 12:48 ` Johannes Sixt
2010-02-01 13:39 ` Jeff King
2010-02-01 13:44 ` Jeff King
2010-02-01 17:21 ` Junio C Hamano
2010-02-01 17:40 ` Jeff King [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100201174045.GA5756@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j.sixt@viscovery.net \
--cc=madcoder@debian.org \
--cc=opensource@elliecomputing.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).