From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Lanny Ripple <lanny@spotinfluence.com>,
Thomas Rast <trast@inf.ethz.ch>,
git@vger.kernel.org
Subject: Re: Bug: rebase when an author uses accents in name on MacOSx
Date: Sat, 2 Jun 2012 12:23:36 -0400 [thread overview]
Message-ID: <20120602162336.GC15017@sigill.intra.peff.net> (raw)
In-Reply-To: <7vmx4n3sz5.fsf@alter.siamese.dyndns.org>
On Fri, Jun 01, 2012 at 09:19:26AM -0700, Junio C Hamano wrote:
> Jeff King <peff@peff.net> writes:
> > [Please don't top-post.]
> > ...
> > But you have to keep in mind all of the people who will be led down the
> > wrong path by your breadcrumb when the failure is caused by a
> > _different_ problem. What is the probability that it is helpful versus
> > not helpful? If you are going to give advice that sed might be broken,
> > you should at least test to see if it is broken and report it.
>
> Eek, do that at runtime in the error code path?
Yes, which I think is utterly gross, but at least it is on the error
code path, so most people will never run it.
It's slightly less gross to do it at build-time (or even as part of
configure, I guess), but of course it is a run-time dependency, so there
is nothing to stop the broken sed from being installed after git (or
even a user with a different PATH than the builder triggering it).
One gross thing about doing it at run-time is that it only affects
_this_ code path, which happens to have an easy-to-diagnose outcome from
the bug. But how many other code paths are using sed on data which might
contain utf-8 characters? And are they failing silently or otherwise
simply corrupting the output?
One other thing to think about: this particular manifestation of the
bug is to cause our shell-quoting to fail. Are there are security
implications? That is, can I execute arbitrary code by having you run
get_author_ident_from_commit on a specially-crafted commit?
> The problem I see is that at that point where we have to suspect
> something fundamental as sed broken on the platform, we cannot even
> trust printf, test, or even the shell itself behaving sanely.
I don't think that's true. We have to deal with this kind of portability
nonsense all the time. We assume that the tools work until we get a
report that they don't, and then we fix it, work around it, or whatever.
Yes, the "your sed is broken" test would not work if "test" is also
totally broken. But we have not seen such a system in real life, or have
reason to suspect that it exists. Whereas we do know there is a
common[1] platform where the sed is broken in a specific way, but
nothing else is. Dealing with that helps solve a real problem for some
people.
-Peff
[1] I am just guessing about how common it is. I still haven't seen an
indication of how common this version of sed is, or even which
versions are affected.
next prev parent reply other threads:[~2012-06-02 16:23 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-30 22:16 Bug: rebase when an author uses accents in name on MacOSx Lanny Ripple
2012-05-30 23:45 ` Junio C Hamano
2012-05-30 23:57 ` Jürgen Kreileder
2012-05-31 1:19 ` Jeff King
2012-05-31 6:33 ` Junio C Hamano
2012-05-31 13:36 ` Lanny Ripple
2012-05-31 14:28 ` Thomas Rast
2012-05-31 14:56 ` Lanny Ripple
2012-05-31 17:34 ` Junio C Hamano
2012-05-31 17:49 ` Lanny Ripple
2012-05-31 18:33 ` Junio C Hamano
2012-05-31 19:21 ` Lanny Ripple
2012-06-01 9:30 ` Jeff King
2012-06-01 13:56 ` Lanny Ripple
2012-06-02 16:09 ` Jeff King
2012-06-02 16:37 ` Lanny Ripple
2012-06-01 16:19 ` Junio C Hamano
2012-06-01 17:05 ` Lanny Ripple
2012-06-01 17:57 ` Junio C Hamano
2012-06-02 16:23 ` Jeff King [this message]
2012-05-31 9:33 ` Thomas Rast
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=20120602162336.GC15017@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=lanny@spotinfluence.com \
--cc=trast@inf.ethz.ch \
/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).