git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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:57:39 -0700	[thread overview]
Message-ID: <xmqq5y6jjlcs.fsf@gitster.g> (raw)
In-Reply-To: <xmqqsf9njmc9.fsf@gitster.g> (Junio C. Hamano's message of "Sun, 16 Jul 2023 19:36:22 -0700")

Junio C Hamano <gitster@pobox.com> writes:

> 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.

We could go to the extreme in the complete opposite, if we do not
care about the quality of the "privacy" feature, and you could
probably talk me into adopting below as long as the option or the
configuration are not named with the word "privacy" in them (a
"--useless-time" option, or a "core.uselesstime" configuration
variable, are OK).

When the feature is in effect, all timestamps in commit and tag
objects pretend to be in UTC timezone, and

 (1) the commits record the Epoch as its timestamps if there is no
     parent;

 (2) the commits record one second after the largest of the
     timestamps as its timestamps of all its parents;

 (3) in any case, the same (phoney) timestamp is used for author and
     committer.

 (4) the tags record the Epoch as its timestamp if they point at
     trees or blobs.

 (5) the tags record one second after the largest timestamp of
     pointee as their timestamp, if they point at tags or commits.

 (6) as the reflog is a local matter, its timestamp may be local,
     but it is OK if it ends up being just a useless number if that
     is more convenient to implement.

The resulting history will be shouting that "I am privacy conscious
and hiding my activities behind a fake clock" in capital letters,
which I would not call a quality design of a privacy feature, but it
does completely dissociate the wallclock time from the recorded
history without breaking the monotonicity of timestamps in the
recorded history.

When the useless-time feature is in use, you cannot expect features
like "git log --since" would work sensibly, but that is a given, I
would guess.

  reply	other threads:[~2023-07-17  2:57 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
2023-07-17  2:57             ` Junio C Hamano [this message]
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=xmqq5y6jjlcs.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).