Skip to content

Instantly share code, notes, and snippets.

@vpetro
Created October 28, 2011 18:17
Show Gist options
  • Save vpetro/1322960 to your computer and use it in GitHub Desktop.
Save vpetro/1322960 to your computer and use it in GitHub Desktop.
petro
#!/bin/bash
set -e
CURDIR=`pwd`
AUTHOR=$1
FORMAT="%C(yellow)%h%Creset -%C(red)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset"
SINCE="15 months ago"
UNTIL="14 months ago"
DIRS=`find . -type d -name ".*git" -exec dirname {} \; | egrep -v "\w+/GazaroUtilities" | sed "s/^..//"`
for DIR in $DIRS; do
cd $DIR
CLEAN_DIR=`echo $DIR | tr "/" "-"`
git log --author="${AUTHOR}" --since="${SINCE}" --until="${UNTIL}" --format="${FORMAT}" | sed "s/.*/{$CLEAN_DIR} &/"
cd $CURDIR
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment