docs: handle `git describe` failing
[guilt.git] / guilt-diff
blob627eb167d4a44f336c6699bd8cf740dad8d4c196
1 #!/bin/sh
3 # Copyright (C) 2007 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
6 USAGE="[-z] [<path>...]"
7 . `dirname $0`/guilt
9 while [ $# -ne 0 ]; do
10 case "$1" in
11 -z)
12 working_tree=t ;;
13 -* | --*)
14 usage ;;
17 break ;;
18 esac
19 shift
20 done
22 PREV=HEAD^
23 [ -z "`get_top`" ] && PREV=
24 [ ! -z "$working_tree" ] && PREV=
26 git diff $PREV -- "$@"