#!/bin/sh -e if [ $# = 3 ] && tree=$(git-cat-file commit "$3" |head -1) && [ "$tree" = "tree $1" ] then echo -n " EMPTY " >&2 echo "$3" else echo -n " NON-EMPTY " >&2 git-commit-tree "$@" fi