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