Last active
February 10, 2016 12:48
-
-
Save jFransham/bfb39f879d049bc881f8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function bchangedat { | |
git log -1 $@ | grep 'Date: ' | perl -pe 's|^\S+\s+(.+?)\s+\S+$|\1|' | |
} | |
function mywork { | |
bwithdates=$( | |
for i in $(git branch | sed 's/^..//'); do | |
chng=$(bchangedat $i --date=raw --author=`git config --global user.name`) | |
if [ "$chng" ]; then | |
echo $chng $i "($( | |
bchangedat $i --author=`git config --global user.name` | |
))" | |
fi | |
done | |
) | |
echo -e "$bwithdates" | sort -r | perl -pe 's|^\S+\s+||' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment