summaryrefslogtreecommitdiff
path: root/bin/git-bdiff
blob: 2d330d3fb27b318db0b03d2cf517c41ffe4294f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash -e

# Diff for a branch, starting from where it diverges from its upstream.

BRANCH=HEAD
if [ $# -gt 0 ]; then
	BRANCH="$1"
	shift
fi

exec git diff "${BRANCH}@{upstream}"..."${BRANCH}" "$@"