summaryrefslogtreecommitdiff
path: root/git-merge-diff.in
diff options
context:
space:
mode:
Diffstat (limited to 'git-merge-diff.in')
-rwxr-xr-xgit-merge-diff.in11
1 files changed, 11 insertions, 0 deletions
diff --git a/git-merge-diff.in b/git-merge-diff.in
new file mode 100755
index 0000000..ad885de
--- /dev/null
+++ b/git-merge-diff.in
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+up="$1"
+shift
+[ $# -gt 0 ] \
+&& [ -n "${1%%--*}" ] \
+&& down="$1" \
+&& shift \
+|| down=HEAD
+
+git diff "$(git merge-base "$up" "$down")" "$down" "$@"