[PATCH] guilt: skip empty line after from: line in patch descriptoin
[guilt.git] / guilt-diff
blob182fa59a9a4f71f9e422d98409f99f936f89cf9d
1 #!/bin/sh
3 # Copyright (C) Josef 'Jeff' Sipek, 2007-2011
6 USAGE="[-z] [<path>...]"
7 if [ -z "$GUILT_VERSION" ]; then
8 echo "Invoking $GUILT 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 -- "$@"