#!/usr/bin/env bash
# git-branch-info - verbose branch list
git branch --all --no-color |
sed -e 's/\*/ /' |
while read branch; do
	branch=${branch%% *}
	ref=$branch
	case $ref in
	*/HEAD)		continue;;
	remotes/*)	color='magenta'; branch=${branch#remotes/};;
	*)		color='yellow';;
	esac
	git log -1 --format=format:"%C($color)${branch}%C(reset) %s %C(blue)(%cr)%C(reset)" "$ref"
done
