#!/bin/sh -e
#
# show_branches - shows branches with last commit-date/hash/message
# for use in gitconfig/with fzf

# git branch --sort=-committerdate --format='%();;%(refname:short);;%(committerdate:short);;'
git --no-pager branch \
  --color=always \
  --list \
  --sort=-committerdate \
  --format '%(align:width=1)%(if)%(HEAD)%(then)%(color:green)%(else)%(color:yellow)%(end)%(refname:short)%(end) %(color:magenta)%(align:width=12)%(committerdate:relative)%(end) %(color:cyan)%(objectname:short) %(color:white)%(subject)'
