2005-06-14 00:09:34 +02:00
|
|
|
#!/bin/sh
|
|
|
|
rev=($(git-rev-parse --revs-only "$@"))
|
|
|
|
flags=($(git-rev-parse --no-revs "$@"))
|
|
|
|
case "${#rev[*]}" in
|
|
|
|
0)
|
2005-06-18 00:34:19 +02:00
|
|
|
git-diff-files -M -p "$@";;
|
2005-06-14 00:09:34 +02:00
|
|
|
1)
|
2005-06-18 00:34:19 +02:00
|
|
|
git-diff-cache -M -p "$@";;
|
2005-06-14 00:09:34 +02:00
|
|
|
2)
|
|
|
|
begin=$(echo "${rev[1]}" | tr -d '^')
|
|
|
|
end="${rev[0]}"
|
2005-06-18 00:34:19 +02:00
|
|
|
git-diff-tree -M -p $flags $begin $end;;
|
2005-06-14 00:09:34 +02:00
|
|
|
*)
|
|
|
|
echo "I don't understand"
|
|
|
|
exit 1;;
|
|
|
|
esac
|