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