Skip to content

Commit 77bc525

Browse files
committed
./g review should use --force-with-lease
It is safer in case somebody pushed to the remote ref in the meantime. Signed-off-by: Jan Holesovsky <[email protected]> Change-Id: I8e22929402d8aa18253241ff8952b83610c79a0b
1 parent 91fd7d2 commit 77bc525

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

g

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ if [ "$1" == "review" ]; then
7575
exit 1
7676
elif [ -n "$HAS_REMOTE_BRANCH" ] && [ -n "$CUSTOM_BRANCH" ]; then
7777
# PR is open, same branch is explicitly specified, just update it.
78-
git push -f $REMOTE HEAD:$REMOTE_BRANCH
78+
git push --force-with-lease $REMOTE HEAD:$REMOTE_BRANCH
7979
else
8080
# Open a new PR.
8181
git push $REMOTE HEAD:$REMOTE_BRANCH

0 commit comments

Comments
 (0)