{diff,import-commit,new}: fix handling of binary files
[guilt/mob.git] / guilt-diff
blobbbb6089023712b24670a2184c088526d2610b81e
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 --binary $PREV -- "$@"