diff --git a/contrib/source-control-tools/land-patch.sh b/contrib/source-control-tools/land-patch.sh --- a/contrib/source-control-tools/land-patch.sh +++ b/contrib/source-control-tools/land-patch.sh @@ -53,5 +53,10 @@ # Sanity checks "${TOPLEVEL}"/contrib/devtools/smoke-tests.sh +# Make sure master is up-to-date. If there is a merge conflict, this script +# will not attempt to resolve it and simply fail. +git fetch origin master +git rebase origin/master + # Push the change. Phabricator will automatically close the associated revision. git push "${GIT_ARGS[@]}" origin master