Files
zulip/tools/reset-to-pull-request
Christie Koehler 24e2690ec2 tools: Improve git scripts.
Minor fixes that enable the ability to:

- Re-run fetch-rebase-pull-request.
- Specify the name of the remote repo as an optional second parameter.
  The default remains 'upstream'.
2016-10-11 13:38:38 -07:00

9 lines
139 B
Bash
Executable File

#!/bin/bash
set -e
set -x
request_id="$1"
remote=${2:-"upstream"}
git fetch "$remote" "pull/$request_id/head"
git reset --hard FETCH_HEAD