Skip to content

Instantly share code, notes, and snippets.

View bhr's full-sized avatar

Benedikt Hirmer bhr

View GitHub Profile
@srigi
srigi / gist:f81ce80d5c5c8f815e40
Created June 7, 2014 19:15
cloc statistics by commit
# !/bin/bash
startCommit=$2
initialCommit=`git rev-parse HEAD` # commit of the repository before we start the work
file='cloc-stats.csv'
# use sed to remove duplicate lines with commit ID, git-rev-list not fully accepting my format, arrrgh
if [[ $1 = "--help" || $1 = "-h" ]]; then
echo "Generate 'cloc per commit' stats from a GIT repository by following the parent links from the given commit."