Skip to content

Instantly share code, notes, and snippets.

@rondale-sc
Created December 10, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rondale-sc/7cecabde749eb56ebad6 to your computer and use it in GitHub Desktop.
Save rondale-sc/7cecabde749eb56ebad6 to your computer and use it in GitHub Desktop.
harvest() {
dow=$(date "+%u")
if [ -n "$2" ]; then
date=$2
else
if [ $dow = "1" ]; then
date=$(date -v-mon -v -1w "+%Y-%m-%d 00:00:00")
else
date=$(date -v-mon "+%Y-%m-%d 00:00:00")
fi
fi
echo $date
git log --pretty=format:%ad\ %s\; --author="$1" --since="$date"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment