Skip to content

Instantly share code, notes, and snippets.

@jFransham
Last active February 10, 2016 12:48
Show Gist options
  • Save jFransham/bfb39f879d049bc881f8 to your computer and use it in GitHub Desktop.
Save jFransham/bfb39f879d049bc881f8 to your computer and use it in GitHub Desktop.
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