Skip to content

Instantly share code, notes, and snippets.

@marciobarrios
Created July 19, 2019 08:58
Show Gist options
  • Save marciobarrios/20bf967c678227dd542d7ccef4d50934 to your computer and use it in GitHub Desktop.
Save marciobarrios/20bf967c678227dd542d7ccef4d50934 to your computer and use it in GitHub Desktop.
Git command to show a list of commits across the different hours of a day for an specific author (https://gist.github.com/bessarabov/674ea13c77fc8128f24b5e3f53b7f094)
git log --author="Linus Torvalds" --date=iso | perl -nalE 'if (/^Date:\s+[\d-]{10}\s(\d{2})/) { say $1+0 }' | sort | uniq -c|perl -MList::Util=max -nalE '$h{$F[1]} = $F[0]; }{ $m = max values %h; foreach (0..23) { $h{$_} = 0 if not exists $h{$_} } foreach (sort {$a <=> $b } keys %h) { say sprintf "%02d - %4d %s", $_, $h{$_}, "*"x ($h{$_} / $m * 50); }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment