GIT 0.99.3
[git/mingw/4msysgit/kblees.git] / git-diff-script
blob03ed555e777b6dfeac8811338986eb752418ab72
1 #!/bin/sh
2 . git-sh-setup-script || die "Not a git archive"
4 rev=($(git-rev-parse --revs-only "$@"))
5 flags=($(git-rev-parse --no-revs --flags "$@"))
6 files=($(git-rev-parse --no-revs --no-flags "$@"))
7 case "${#rev[*]}" in
8 0)
9 git-diff-files -M -p "$@";;
11 git-diff-cache -M -p "$@";;
13 begin=$(echo "${rev[1]}" | tr -d '^')
14 end="${rev[0]}"
15 git-diff-tree -M -p $flags $begin $end $files;;
17 echo "I don't understand"
18 exit 1;;
19 esac