From: Jeff King <peff@peff.net>
To: "Giuseppe Crinò" <giuscri@gmail.com>
Cc: "SZEDER Gábor" <szeder.dev@gmail.com>,
"Pratyush Yadav" <me@yadavpratyush.com>,
"Emily Shaffer" <emilyshaffer@google.com>,
"Bryan Turner" <bturner@atlassian.com>,
"Git Users" <git@vger.kernel.org>
Subject: Re: [BUG] You can't have single quote in your username
Date: Mon, 2 Sep 2019 11:47:33 -0400 [thread overview]
Message-ID: <20190902154732.GD18593@sigill.intra.peff.net> (raw)
In-Reply-To: <20190831131748.GA13001@instance-1.europe-west6-a.c.vaulted-journal-250706.internal>
On Sat, Aug 31, 2019 at 01:17:48PM +0000, Giuseppe Crinò wrote:
> On Mon, Aug 26, 2019 at 03:14:55PM -0400, Jeff King wrote:
> > We'd still want to keep the low-level removal of "<>\n", since those are
> > syntactically significant to Git (i.e., if they sneak in you end up with
> > a broken commit object).
>
> Would it work to change `strbuf_addstr_without_crud()` such that instead of
> removing crud from the beginning and *then* crud from the end, it removes crud
> as long as it's palindromic? Then the function proceeds to remove "<>\n" from
> the string as before.
>
> That would implement the following _mappings_:
>
> 'Foo bar' => Foo bar
> Micheal Jr. => Micheal Jr.
> Mr. McDonalds => Mr. McDonalds
> "John Baz" => John Baz
> "JJ\x0a" => JJ
>
> What do you think?
I think we don't have enough data to really know how much it will help
or hurt. :)
On the plus side, it is less risky than dropping the end-point crud removal
entirely.
But it still risks losing a case where some code path relies on the crud
cleanup for odd cases (mismatched delimiters, or interleaved delimiters,
or non-delimiter crud mixed in with delimiters).
On the one hand, I am actually OK with dropping the crud removal
entirely and seeing what happens, and this is a lesser form of that. On
the other hand, it puts us in a funny in-between situation where tools
can _usually_ get away without cleaning up the names, but occasionally
get bit. It might be easier to just say that we don't do cleanup.
So I dunno. There is no patch to be discussed, and I am not volunteering
to write one. So I think whoever chooses to do so has a lot of control
over what is proposed. :)
-Peff
next prev parent reply other threads:[~2019-09-02 15:47 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-22 12:32 [BUG] You can't have single quote in your username Giuseppe Crinò
2019-08-22 15:06 ` Pratyush Yadav
2019-08-22 16:24 ` Junio C Hamano
2019-08-23 7:20 ` Giuseppe Crinò
2019-08-23 7:29 ` Michal Suchánek
2019-08-22 16:06 ` René Scharfe
2019-08-22 16:58 ` Bryan Turner
2019-08-22 17:08 ` Emily Shaffer
2019-08-22 18:43 ` Pratyush Yadav
2019-08-23 8:29 ` SZEDER Gábor
2019-08-23 9:35 ` Giuseppe Crinò
2019-08-23 10:15 ` SZEDER Gábor
2019-08-24 17:49 ` Giuseppe Crinò
2019-08-25 8:09 ` Giuseppe Crinò
2019-08-26 19:14 ` Jeff King
2019-08-27 13:51 ` Giuseppe Crino'
2019-08-27 14:33 ` Michal Suchánek
2019-08-28 14:33 ` Giuseppe Crino'
2019-08-28 14:56 ` Jeff King
2019-08-31 13:17 ` Giuseppe Crinò
2019-09-02 15:47 ` Jeff King [this message]
2019-09-02 19:25 ` Junio C Hamano
2019-09-02 19:50 ` Michal Suchánek
2019-09-03 7:51 ` Giuseppe Crinò
2019-09-03 9:03 ` Michal Suchánek
2019-08-23 8:26 ` SZEDER Gábor
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190902154732.GD18593@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=bturner@atlassian.com \
--cc=emilyshaffer@google.com \
--cc=git@vger.kernel.org \
--cc=giuscri@gmail.com \
--cc=me@yadavpratyush.com \
--cc=szeder.dev@gmail.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).