summaryrefslogtreecommitdiff
path: root/git-merge-diff.in
blob: ad885def184138fef6c69658815b0f28c0adbd78 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash

up="$1"
shift
[ $# -gt 0 ] \
&& [ -n "${1%%--*}" ] \
&& down="$1" \
&& shift \
|| down=HEAD

git diff "$(git merge-base "$up" "$down")" "$down" "$@"