From: Giuseppe Crinò Date: Sat, 31 Aug 2019 13:17:48 GMT Subject: Re: [BUG] You can't have single quote in your username Message-ID: <20190831131748.GA13001@instance-1.europe-west6-a.c.vaulted-journal-250706.internal> In-Reply-To: <20190828145640.GC14432@sigill.intra.peff.net> 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?