2005-06-14 00:09:34 +02:00
|
|
|
#!/bin/sh
|
|
|
|
rev=($(git-rev-parse --revs-only "$@"))
|
2005-07-06 19:09:58 +02:00
|
|
|
flags=($(git-rev-parse --no-revs --flags "$@"))
|
|
|
|
files=($(git-rev-parse --no-revs --no-flags "$@"))
|
2005-06-14 00:09:34 +02:00
|
|
|
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-07-06 19:09:58 +02:00
|
|
|
git-diff-tree -M -p $flags $begin $end $files;;
|
2005-06-14 00:09:34 +02:00
|
|
|
*)
|
|
|
|
echo "I don't understand"
|
|
|
|
exit 1;;
|
|
|
|
esac
|