#!/bin/bash

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

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