g review: update list of remote branches before checking for branch existence
This helps in case you deleted a remote branch using the GitHub web UI, so the local view is outdated. Change-Id: I98be33ea5712c66589f42b64e3462b76b84fbcc5
This commit is contained in:
parent
5999a5b7cc
commit
85e51bbb53
1 changed files with 4 additions and 0 deletions
4
g
4
g
|
@ -28,6 +28,10 @@ if [ "$1" == "review" ]; then
|
|||
REMOTE_BRANCH=private/$USER/$2
|
||||
CUSTOM_BRANCH=y
|
||||
fi
|
||||
|
||||
# So that we have an up to date view on what remote branches exist.
|
||||
git fetch --prune $REMOTE
|
||||
|
||||
HAS_REMOTE_BRANCH=
|
||||
if git rev-parse --quiet --verify $REMOTE/$REMOTE_BRANCH >/dev/null; then
|
||||
HAS_REMOTE_BRANCH=y
|
||||
|
|
Loading…
Reference in a new issue