#!/bin/sh
# report on git repo in the current directory

if type -t git >&/dev/null; then
	if pushd "$1" >/dev/null && [ -d .git ]; then
		echo -n "$(git branch --show-current) @ "
		git show-ref --head -ds -- HEAD | head -1
		git status -s
		echo
		popd >/dev/null
	fi
fi
