Documentation: guilt & git don't use hyphenated commands
[guilt.git] / guilt-diff
blob83cda27a960ef28bf31b88613e7219bba28a4c89
1 #!/bin/sh
3 # Copyright (C) Josef 'Jeff' Sipek, 2007-2013
6 USAGE="[-z] [<path>...]"
7 if [ -z "$GUILT_VERSION" ]; then
8 echo "Invoking `basename "$0"` directly is no longer supported." >&2
9 exit 1
12 _main() {
14 while [ $# -ne 0 ]; do
15 case "$1" in
16 -z)
17 working_tree=t ;;
18 -* | --*)
19 usage ;;
22 break ;;
23 esac
24 shift
25 done
27 PREV=HEAD^
28 [ -z "`get_top`" ] && PREV=
29 [ ! -z "$working_tree" ] && PREV=
31 git diff --binary $PREV -- "$@"