Anonymous contributions

Johannes Zarl-Zierl johannes at zarl-zierl.at
Tue Apr 16 21:54:09 BST 2019


Am Dienstag, 16. April 2019, 21:38:04 CEST schrieb Ben Cooksley:
> 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.

You could just create a hook to ask the user to verify their setup:

1. Check for a file .git/verified_id
2. Compare its contents to username and email
3. If it's different, abort the commit and ask the user if the info is correct 
and provide a copy/paste snippet to fix the verified_id file...

Would that work?

Cheers,
  Johannes






More information about the kde-community mailing list