1#!/bin/sh
2rev=($(git-rev-parse --revs-only "$@"))
3flags=($(git-rev-parse --no-revs "$@"))
4case "${#rev[*]}" in
50)
6git-diff-files -M -p "$@";;
71)
8git-diff-cache -M -p "$@";;
92)
10begin=$(echo "${rev[1]}" | tr -d '^')
11end="${rev[0]}"
12git-diff-tree -M -p $flags $begin $end;;
13*)
14echo "I don't understand"
15exit 1;;
16esac