From: Junio C Hamano <gitster@pobox.com>
To: "René Scharfe" <l.s.r@web.de>
Cc: nick <nick@nicholasjohnson.ch>, git@vger.kernel.org
Subject: Re: Git Privacy
Date: Sun, 16 Jul 2023 19:36:22 -0700 [thread overview]
Message-ID: <xmqqsf9njmc9.fsf@gitster.g> (raw)
In-Reply-To: <1d36d5ce-f452-fc31-6e30-b4ba819de7e4@web.de> ("René Scharfe"'s message of "Sun, 16 Jul 2023 13:47:29 +0200")
René Scharfe <l.s.r@web.de> writes:
> But Git is not a legal entity, it's just a command line program that you,
> the data subject, control. You can use the option --date or the
> environment variable GIT_AUTHOR_DATE to set the author timestamp and the
> variable GIT_COMMITTER_DATE to set the committer timestamp on commit.
> Not sure why there is no command line option for the latter, hmm.
For two reasons.
* While using the GIT_AUTHOR_DATE environment variable is perfectly
adequate (after all, we did not have the option before Git 1.7.0,
released in Feb 2010), overriding the author time with "--date"
had a good reason to exist, unlike the committer timestamp.
Imagine you were relayed somebody else's changes, not via a
format that is kosher and acceptable by "git am", but somehow
managed to reproduce in your working tree. If you also have
learned when and in which timezone the original author made that
change, you'd want to have a way to record it.
* Having a system clock that can randomly go backwards and using
such a system clock to record the committer timestamp, has broken
"git log" in mergy-bushy histories. This issue has been somewhat
mitigated by introduction of generation numbers, but traversing
the commits in the newer part of the history that are not yet
covered by commit-graph would be affected if you let your commit
timestamps go back and force deliberately.
> So I see this more as a usability issue. Git allows its users to tailor
> commits to suit their needs in many ways. You can edit file contents,
> history and metadata. For timestamp and timezone this isn't as
> convenient as it could be.
I think the existing two environment variables are very good place
to draw the line. When we start talking about "privacy", just like
"security", the exact details of the design and the implementation
would affect the resulting quality of the "privacy enhancing
features", but our primary mission is source code control and we are
not equipped to even measure how good our implementation would be.
Just like we do not pretend to be security engineers and do not
invent our own implementations of the hash functions and secure
network transports (instead we let third-parties to implement them
and just use them), we should NOT be adding a "--privacy" option
that picks rand(24)*60 as UTC offset and pretends that it the
timezone of the author, and picks some random timestamp between the
timestamp of the latest commit in the repository and the actual
wallclock timestamp and pretends that is the author time. After
all, our project is not about coming up with a quality time
obfusucation.
But the good thing is that privacy-minded folks can write a quality
implementation of a much better design to lie about the timezone and
the current time, preferrably (but not absolutely necessary) within
the constraints that the time should not go backwards, which would
help Git. Once such an external program is written, the users can
arrange that the program is called every time the shell gives the
control back to the user to set its output to GIT_AUTHOR_DATE. Zsh
has precmd mechansim that you can use to invoke such a mechanism
before each prompt; bash has PROMPT_COMMAND that can used in a
similar way.
Needless to say, such a "privacy enhancing `date` command" can be
used outside the context of Git, too. My point is that it is not
within the scope of this project to add an internal implementation
of such a command and drive that from a command line option or a
configuration variable.
Thanks.
next prev parent reply other threads:[~2023-07-17 2:37 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-13 16:27 Git Privacy nick
2023-07-13 17:11 ` Junio C Hamano
2023-07-14 9:22 ` nick
2023-07-14 16:45 ` Junio C Hamano
2023-07-15 4:32 ` nick
2023-07-16 11:47 ` René Scharfe
2023-07-16 22:52 ` nick
2023-07-17 2:36 ` Junio C Hamano [this message]
2023-07-17 2:57 ` Junio C Hamano
2023-07-17 5:36 ` nick
2023-07-17 20:57 ` Theodore Ts'o
2023-07-17 22:49 ` nick
2023-07-17 16:37 ` Junio C Hamano
2023-07-16 23:07 ` nick
2023-07-16 23:27 ` Jason Pyeron
2023-07-17 4:20 ` nick
2023-07-18 21:59 ` brian m. carlson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqsf9njmc9.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=l.s.r@web.de \
--cc=nick@nicholasjohnson.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).