[PATCH] Update the list of diagnostics for git-commit-tree
[git.git] / git-diff-script
1 #!/bin/sh
2 . git-sh-setup-script || die "Not a git archive"
3
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 "$@";;
10 1)
11         git-diff-cache -M -p "$@";;
12 2)
13         begin=$(echo "${rev[1]}" | tr -d '^')
14         end="${rev[0]}"
15         git-diff-tree -M -p $flags $begin $end $files;;
16 *)
17         echo "I don't understand"
18         exit 1;;
19 esac