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