Re: [BUG] You can't have single quote in your username

2019-09-03 Thread Michal Suchánek
On Tue, 3 Sep 2019 07:51:54 + Giuseppe Crinò wrote: > On Mon, Sep 02, 2019 at 12:25:37PM -0700, Junio C Hamano wrote: > > I'd rather leave the sleeping dog lie, if we need to encourage > > people to live in 21st century and step outside US-ASCII to do so, > > then do that instead. > > +1 t

Re: [BUG] You can't have single quote in your username

2019-09-03 Thread Giuseppe Crinò
On Mon, Sep 02, 2019 at 12:25:37PM -0700, Junio C Hamano wrote: > I'd rather leave the sleeping dog lie, if we need to encourage > people to live in 21st century and step outside US-ASCII to do so, > then do that instead. +1 to let the sleeping dog lie. When you say we should encourage people to s

Re: [BUG] You can't have single quote in your username

2019-09-02 Thread Michal Suchánek
On Mon, 02 Sep 2019 12:25:37 -0700 Junio C Hamano wrote: > Jeff King writes: > > > 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). > > ... >

Re: [BUG] You can't have single quote in your username

2019-09-02 Thread Junio C Hamano
Jeff King writes: > 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). > ... > So I dunno. There is no patch to be discussed, and I am not volunteeri

Re: [BUG] You can't have single quote in your username

2019-09-02 Thread Jeff King
On Sat, Aug 31, 2019 at 01:17:48PM +, 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

Re: [BUG] You can't have single quote in your username

2019-08-31 Thread Giuseppe Crinò
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 th

Re: [BUG] You can't have single quote in your username

2019-08-28 Thread Jeff King
On Wed, Aug 28, 2019 at 02:33:15PM +, Giuseppe Crino' wrote: > On Mon, Aug 26, 2019 at 03:14:55PM -0400, Jeff King wrote: > > But we'd still need something at least for > > GECOS, where "Your Name" is common. > > As I understand this, those commas are *not* removed by > strbuf_addstr_with

Re: [BUG] You can't have single quote in your username

2019-08-28 Thread Giuseppe Crino'
On Mon, Aug 26, 2019 at 03:14:55PM -0400, Jeff King wrote: > But we'd still need something at least for > GECOS, where "Your Name" is common. As I understand this, those commas are *not* removed by strbuf_addstr_without_crud(). Instead they're skipped from /etc/pass -- see `ident.c/copy_gecos(

Re: [BUG] You can't have single quote in your username

2019-08-27 Thread Michal Suchánek
On Tue, 27 Aug 2019 13:51:49 + "Giuseppe Crino'" wrote: > On Mon, Aug 26, 2019 at 03:14:55PM -0400, Jeff King wrote: > > So it might make sense to push these rules into "git mailinfo" instead > > of applying them everywhere. But we'd still need something at least for > > GECOS, where "Your Na

Re: [BUG] You can't have single quote in your username

2019-08-27 Thread Giuseppe Crino'
On Mon, Aug 26, 2019 at 03:14:55PM -0400, Jeff King wrote: > So it might make sense to push these rules into "git mailinfo" instead > of applying them everywhere. But we'd still need something at least for > GECOS, where "Your Name" is common. What's the GECOS you mean?

Re: [BUG] You can't have single quote in your username

2019-08-26 Thread Jeff King
On Fri, Aug 23, 2019 at 10:29:00AM +0200, SZEDER Gábor wrote: > On Fri, Aug 23, 2019 at 12:13:12AM +0530, Pratyush Yadav wrote: > > > Does it make more sense to replace this strbuf_addstr_without_crud() > > > setup with something more intelligent (i.e. checking for matching crud > > > on either en

Re: [BUG] You can't have single quote in your username

2019-08-25 Thread Giuseppe Crinò
On Sat, Aug 24, 2019 at 05:49:52PM +, Giuseppe Crinò wrote: > On Fri, Aug 23, 2019 at 10:29:00AM +0200, SZEDER Gábor wrote: > > What I wonder is whether we really have to remove crud from the user > > name if it comes from the configuration. > > Yes. If the primary use of removing crud is to r

Re: [BUG] You can't have single quote in your username

2019-08-24 Thread Giuseppe Crinò
On Fri, Aug 23, 2019 at 10:29:00AM +0200, SZEDER Gábor wrote: > What I wonder is whether we really have to remove crud from the user > name if it comes from the configuration. Yes. If the primary use of removing crud is to remove quotes from a quoted name (as in `From: 'Foo baz Bar'`) why not dire

Re: [BUG] You can't have single quote in your username

2019-08-23 Thread SZEDER Gábor
On Fri, Aug 23, 2019 at 11:35:48AM +0200, Giuseppe Crinò wrote: > On Fri, Aug 23, 2019 at 10:29 AM SZEDER Gábor wrote: > > If we go down this route, then someone might want to write ő as o" or > > ű as u", which still supposed to be used in pairs, but what if someone > > wants to write ä as a:, ö

Re: [BUG] You can't have single quote in your username

2019-08-23 Thread Giuseppe Crinò
On Fri, Aug 23, 2019 at 10:29 AM SZEDER Gábor wrote: > If we go down this route, then someone might want to write ő as o" or > ű as u", which still supposed to be used in pairs, but what if someone > wants to write ä as a:, ö as o:, ü as u:, ç as "c,", ş as "s,", etc. I don't know any language th

Re: [BUG] You can't have single quote in your username

2019-08-23 Thread SZEDER Gábor
On Fri, Aug 23, 2019 at 12:13:12AM +0530, Pratyush Yadav wrote: > > Does it make more sense to replace this strbuf_addstr_without_crud() > > setup with something more intelligent (i.e. checking for matching crud > > on either end, like ^[$crudchars].*\1$? We already check for matched <>. > > Sound

Re: [BUG] You can't have single quote in your username

2019-08-23 Thread SZEDER Gábor
On Thu, Aug 22, 2019 at 10:08:17AM -0700, Emily Shaffer wrote: > On Thu, Aug 22, 2019 at 09:58:48AM -0700, Bryan Turner wrote: > > If your goal is an accented "e", wouldn't it be better to set your > > name using é, rather than a trailing apostrophe? "git commit" would > > likely preserve that with

Re: [BUG] You can't have single quote in your username

2019-08-23 Thread Michal Suchánek
On Fri, 23 Aug 2019 09:20:47 +0200 Giuseppe Crinò wrote: > On Thu, Aug 22, 2019 at 6:24 PM Junio C Hamano wrote: > > The logic there exists in order to remove cruft around the name on a > > typical e-mail header (remember, most of the very core-ish part of > > the Git was written and got solidif

Re: [BUG] You can't have single quote in your username

2019-08-23 Thread Giuseppe Crinò
On Thu, Aug 22, 2019 at 6:24 PM Junio C Hamano wrote: > The logic there exists in order to remove cruft around the name on a > typical e-mail header (remember, most of the very core-ish part of > the Git was written and got solidified back when the Linux kernel > was the primary client of the syst

Re: [BUG] You can't have single quote in your username

2019-08-22 Thread Pratyush Yadav
On 22/08/19 10:08AM, Emily Shaffer wrote: > On Thu, Aug 22, 2019 at 09:58:48AM -0700, Bryan Turner wrote: > > On Thu, Aug 22, 2019 at 5:32 AM Giuseppe Crinò wrote: > > > > > > Note how `git log` discards the ending quote character: > > > > > > > > > root@NBR1710R:~/repo# git add foo > > > root@

Re: [BUG] You can't have single quote in your username

2019-08-22 Thread Emily Shaffer
On Thu, Aug 22, 2019 at 09:58:48AM -0700, Bryan Turner wrote: > On Thu, Aug 22, 2019 at 5:32 AM Giuseppe Crinò wrote: > > > > Note how `git log` discards the ending quote character: > > > > > root@NBR1710R:~/repo# git add foo > > root@NBR1710R:~/repo# git commit -m 'first' > > [master (root-com

Re: [BUG] You can't have single quote in your username

2019-08-22 Thread Bryan Turner
On Thu, Aug 22, 2019 at 5:32 AM Giuseppe Crinò wrote: > > Note how `git log` discards the ending quote character: > root@NBR1710R:~/repo# git add foo > root@NBR1710R:~/repo# git commit -m 'first' > [master (root-commit) a78e11f] first > Committer: Les Actualite If you look closely here, in t

Re: [BUG] You can't have single quote in your username

2019-08-22 Thread Junio C Hamano
Pratyush Yadav writes: > This strbuf_addstr_without_crud() function removes various characters > from the start and end of the author info, one of which is the single > quotation. I'm not sure why this is done, the more experienced folk > where will have the answer. The logic there exists in

Re: [BUG] You can't have single quote in your username

2019-08-22 Thread René Scharfe
Am 22.08.19 um 14:32 schrieb Giuseppe Crinò: > name = Les Actualite\\' You can name yourself anything you like, of course, and I don't actually speak French, but wouldn't it rather be "L'actualité"? I just reply as a fellow accent-bearer, feel free to ignore me.. René

Re: [BUG] You can't have single quote in your username

2019-08-22 Thread Pratyush Yadav
On 22/08/19 02:32PM, Giuseppe Crinò wrote: > Note how `git log` discards the ending quote character: > ``` > root@NBR1710R:~# git init repo > Initialized empty Git repository in /root/repo/.git/ > root@NBR1710R:~# cd repo/ > root@NBR1710R:~/repo# git config user.name Les Actualite\' > root@NBR1710R

[BUG] You can't have single quote in your username

2019-08-22 Thread Giuseppe Crinò
Note how `git log` discards the ending quote character: ``` root@NBR1710R:~# git init repo Initialized empty Git repository in /root/repo/.git/ root@NBR1710R:~# cd repo/ root@NBR1710R:~/repo# git config user.name Les Actualite\' root@NBR1710R:~/repo# cat .git/config [core] repositoryformatv