|Fix function name in error message in randtime()
|README.md: Update status
|README.md: Add portability section
|Use getentropy(3) instead of rand(3)
|Use timegm instead of mktime and take offset into account
Clone the repository to access all 52 commits.
Randomize timestamps associated with Git commits to enhance privacy.
Git associates timestamps with commits. These timestamps expose coding
hours and thereby potentially violate ones privacy. This tool randomizes
the hour of the day, as contained in these timestamps, to enhance
privacy. The tool can be employed automatically for all Git repository
githooks(5) (see below).
I use this daily, works entirely fine for my purposes as is.
This software only requires libgit2. If libgit2 was installed successfully, compile this software as follows:
Afterwards, the software can be installed system-wide using:
This tool can be invoked manually from a Git repository. For example,
the following command would randomize timestamps of all unpushed
commits on the
master branch (i.e. behaves like
$ git shuffle origin/master
However, it is likely desirable to automate this process through global
githooks(5). For this purpose
core.hooksPath will need to be set
git-config(1). Additionally, a
post-commit hook must be
created which amends the previously created commit. For example using:
$ git config --global core.hooksPath ~/.config/git/hooks
$ mkdir -p ~/.config/git/hooks
$ printf "#!/bin/sh\ngit shuffle -a\n" > ~/.config/git/hooks/post-commit
$ chmod +x ~/.config/git/hooks/post-commit
Program usage is described further in the provided man page.
This code requires
getentropy(3) (which is available on Linux and
OpenBSD but not mandated by POSIX) and
err.h which are
also not mandated by POSIX but widely available on both Linux and BSD
The git-privacy utility shares the same goals but has way more configuration options and is thus more complicated. Furthermore, it doesn’t utilize libgit2.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.