[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-dev] git-commit-private: preserve the privacy of your working times



On Tue, Jan 31, 2017 at 04:53:20AM -0500, grarpamp wrote:
> [ ! "$var" ]

Thank you. That was one of the constructs why I never took
bourne shell seriously.. ;)  but this looks a lot more acceptable.
In the spirit of sharing, here's one more privacy-oriented
git script:


#!/bin/sh
#
# working habits privacy-preserving git commit command
#       --lynX & heldensaga, 2016
#
# ever wondered what implications it can have that the git
# logs of the projects you are working on give a lot of
# insight in your working habits.. your discipline, your
# real-life duties or absence of duties? this script
# censors such invasive information. by means of this
# script it will no longer be visible when you committed
# work items and how much time you spent on them. to keep 
# tools, such as redmine, from breaking as they actually 
# make assumptions regarding the continuity of time, this 
# script simply takes the timestamp of the previous commit
# and adds *one second* to it.

# default for new repositories is "1984-04-04 00:44:04 GMT"
# don't try a unixtime before 1973 as git-commit will ignore that.
#
last=`git log -1 --pretty=%ct 2>/dev/null` || last=449887443

next=$(($last+1))

export    GIT_AUTHOR_DATE="$next GMT"
export GIT_COMMITTER_DATE="$next GMT"

exec git commit $*

# then check the results using 'git log --pretty=fuller'



-- 
  E-mail is public! Talk to me in private using encryption:
         http://loupsycedyglgamf.onion/LynX/
          irc://loupsycedyglgamf.onion:67/lynX
         https://psyced.org:34443/LynX/
_______________________________________________
tor-dev mailing list
tor-dev@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev