mirror of https://github.com/zulip/zulip.git
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'.
This commit is contained in:
parent
41587edd2e
commit
24e2690ec2
|
@ -1,9 +1,10 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
|
||||
request_id="$1"
|
||||
git fetch upstream "pull/$request_id/head"
|
||||
git checkout upstream/master -b "review-${request_id}"
|
||||
remote=${2:-"upstream"}
|
||||
git fetch "$remote" "pull/$request_id/head"
|
||||
git checkout -B "review-${request_id}" $remote/master
|
||||
git reset --hard FETCH_HEAD
|
||||
git pull --rebase
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
|
||||
request_id="$1"
|
||||
git fetch upstream "pull/$request_id/head"
|
||||
remote=${2:-"upstream"}
|
||||
git fetch "$remote" "pull/$request_id/head"
|
||||
git reset --hard FETCH_HEAD
|
||||
|
|
Loading…
Reference in New Issue