Skip to content

Instantly share code, notes, and snippets.

@utaal
Last active December 19, 2015 02:29
Show Gist options
  • Save utaal/5883706 to your computer and use it in GitHub Desktop.
Save utaal/5883706 to your computer and use it in GitHub Desktop.
#!/bin/bash
FILES=`git ls-tree --name-only HEAD .`
MAXLEN=0
for f in $FILES; do
if [ ${#f} -gt $MAXLEN ]; then
MAXLEN=${#f}
fi
done
for f in $FILES; do
str=$(git log -1 --decorate --pretty=format:"%C(green)%cr%Creset" $f)
str2=$(git log -1 --decorate --pretty=format:"%C(blue)%h%Creset %s %C(yellow)(%cn)" $f)
printf "%-${MAXLEN}s -- %s \t %s\n" "$f" "$str" "$str2"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment