#!/bin/sh

if test $# = 1 ; then
  pr="$1"
  or="origin"
elif test $# = 2 ; then
  or="$1"
  pr="$2"
else
  echo "$0: fetch a github Pull Request." >&2
  echo "Usage: $0 [remote] PR#" >&2
  exit 1
fi

git fetch $or pull/$pr/head:pr$pr

