# make sure you enter the directory with the repo you want to talk about
# also make sure you increase the fontsize before the presentation
# uses nixpkgs.doitlive
# run with: doitlive play --quiet $HOME/Desktop/Vortraege/git_archeology/presentation.sh

#doitlive speed: 3
#doitlive prompt: sorin

# show where we are
pwd
ls
# default command
git log
clear

# graph
git log --oneline --graph --all
clear

# all the author names
git log --format="%an"
git log --format="%an" | sort --unique

# there are all sorts of format strings availabe, find them in git log --help
git log --date=short --format="%cd %an"

# earliest commit date per author
git log --date=short --format="%cd %an" | sort -k 2 -k 1 | uniq -f 1
# latest commit
# git log --date=short --format="%cd %an" | sort -k 2 -k 1 --reverse | uniq -f 1

# combine entries where the same person has different names
git log --format="%an" | sort --unique

# how to create a mailmap file, go into the directory that contains the repositories and do:
# find . -maxdepth 1 -depth 1 -type d | while read repo; do git -C $repo log --format="%<(30)%aN <%aE>"; done | sort --uniq --ignore-case > .mailmap
# It will have the format: Name <mailaddress>
# Those files can be much more complicated (man git-shortlog), but we only need the names, so thats cool
# edit the file at will to correct things
# To use a mailmap file you have to put it into the repo. You can also place it anywhere and have an entry in your (global) git config to it.q

# questions that arose:
# - is this data covered by data protection?
# - can we see a trend?
# - what else can be read from those git logs

