Re: [RFC PATCH 1/1] hideTimezone: add a user.hideTimezone config
From: Junio C Hamano <hidden>
Date: 2020-10-01 00:05:59
Shengfa Lin [off-list ref] writes: I won't repeat what I said in the other review message, but since I forgot to comment on the log message...
Users requested hiding location in the world from source control trail. This is an implementation to read user.hideTimezone in cmd_commit and set timezone to UTC if it's true. Added a brief explanation of the new field in Documentation and added tests for true/false and reset-author
Not a very good proposed log message, that sounds as if "it is
what 'Users' requested, so it must be a worthwhile thing to do",
which is not the line of thinking to go by.
The convention we follow in the commit log messages is to:
- first explain that the current system does not do X (in present
tense, so we do NOT say "previously we did not do X"), then
- explain why doing X would be a good thing, and finally
- give an order to the codebase to start doing X.
Perhaps
Many places in Git record the timezone of the actor when a
timestamp is recorded, including the committer and author
timestamps in a commit object and the tagger timestamp in a tag
object. Some people however prefer to "lie" about where they
actually are.
They _could_ just say "export TZ=UTC" and be done with it, but
the method would not easily allow them to pretend to be in the
UTC timezone only with Git, while revealing their true timezone
to other activities (e.g. sending e-mail?).
Introduce user.hideTimeZone configuration variable, which can be
optionally set to 'true' to pretend to Git as if the user has
exported environment variable TZ with the value UTC.
Thanks.