> On 16 Apr 2019, at 16:45, Boudewijn Rempt <b...@valdyas.org> wrote:
> 
>> On dinsdag 16 april 2019 21:38:04 CEST Ben Cooksley wrote:
>> 
>> This hook was implemented in the first place to ensure that people had
>> correctly setup Git on their local machine.
>> 
>> On some versions of Git (maybe all?) it will automatically use the local
>> user account name as the name.
>> 
>> This leads to people committing as "me", "user" and "nobody" without
>> meaning to, but which still leads to a situation in which the metadata of a
>> commit has ended up being useless.
>> 
>> I'd rather maintain a small list of exceptions for those who do have names
>> without a space in them to ensure that for the vast majority of our users
>> do correctly get informed they need to fix their local setup.
> 
> You could do a small blacklist of known wrong names like the ones you cite -- 
> but you will never be able to implement a hook that identifies a string as a 
> name correctly. I'm sorry -- but it's just impossible. 
> 
> It's also just not good manners to tell people their name isn't a real name: 
> and I think that allowing ourselves to accept every name except for things 
> like me, user, nobody, admin, root is more important than making sure we've 
> got correct metadata. 
> 
> Because none of us can actually be sure the metadata is correct anyway: 
> there's not just the impossibility of creating that identifies a string as a 
> name correctly, humans cannot do that either.

A blacklist won't work. The common wrong name due to misconfiguration would be 
if I commit as "nicolas" or "nalvarez" instead of "Nicolás Alvarez". That's a 
more common error than "user" or "root".

It seems easier to whitelist legitimate mononyms on request...

-- 
Nicolás

Reply via email to