savezelda/describe.sh

13 lines
267 B
Bash
Raw Normal View History

2009-05-26 10:12:55 +02:00
#!/bin/bash
# Check for git and a git repo.
if head=`git rev-parse --verify HEAD 2>/dev/null`; then
echo -n `git describe`
# Are there uncommitted changes?
git update-index --refresh --unmerged > /dev/null
git diff-index --quiet HEAD || echo -n -dirty
fi
echo