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ò <giuscri@xxxxxxxxx> wrote: > > > > > > Note how `git log` discards the ending quote character: > > > > <snip> > > > > > root@NBR1710R:~/repo# git add foo > > > root@NBR1710R:~/repo# git commit -m 'first' > > > [master (root-commit) a78e11f] first > > > Committer: Les Actualite <root@NBR1710R> > > > > If you look closely here, in the "git commit" output, you can see > > that, as Pratyush indicated, it was actually "git commit" that dropped > > the trailing apostrophe, and "git log" is simply presenting the > > information as it exists in the repository. > > > > 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 without issue. > > Hmm, I don't think it's a good idea to get into the business of telling > contributors how to write their names. There tends to be an axiom that > "all assumptions developers make about human names are false." > > 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 <>. Sounds like something easy enough to implement. There are two types of characters that crud() removes: there are the ones which _should_ appear on both the start and end (', ", <, >), and the ones which don't necessarily have to (., ,, :, ;, \). So we'd need to handle two cases. For the former type, remove a character both at the start and at the end. For the latter, remove only where they appear. If this sounds like something reasonable to do, I'll send a patch fixing this. -- Regards, Pratyush Yadav