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