3 # Copyright (c) 2005 Linus Torvalds
4 # Copyright (c) 2005 Junio C Hamano
6 rev=$(git-rev-parse --revs-only --no-flags --sq "$@") || exit
7 flags=$(git-rev-parse --no-revs --flags --sq "$@")
8 files=$(git-rev-parse --no-revs --no-flags --sq "$@")
10 : ${flags:="'-M' '-p'"}
14 die "I don't understand"
17 begin=$(expr "$rev" : '.*^.\([0-9a-f]*\).*') &&
18 end=$(expr "$rev" : '.\([0-9a-f]*\). .*') || exit
19 cmd="git-diff-tree $flags $begin $end $files"
22 cmd="git-diff-tree $flags $rev $files"
25 cmd="git-diff-index $flags $rev $files"
28 cmd="git-diff-files $flags $files"
31 die "I don't understand $*"