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