summaryrefslogtreecommitdiff
path: root/git-diff-script
diff options
context:
space:
mode:
Diffstat (limited to 'git-diff-script')
-rwxr-xr-xgit-diff-script10
1 files changed, 8 insertions, 2 deletions
diff --git a/git-diff-script b/git-diff-script
index 926f594..99ff264 100755
--- a/git-diff-script
+++ b/git-diff-script
@@ -8,8 +8,14 @@ case "${#rev[*]}" in
1)
git-diff-cache -M -p "$@";;
2)
- begin=$(echo "${rev[1]}" | tr -d '^')
- end="${rev[0]}"
+ case "${rev[1]}" in
+ ^?*)
+ begin=$(echo "${rev[1]}" | tr -d '^')
+ end="${rev[0]}" ;;
+ *)
+ begin="${rev[0]}"
+ end="${rev[1]}" ;;
+ esac
git-diff-tree -M -p $flags $begin $end $files;;
*)
echo "I don't understand"