From c4481302f031a83baa7678650f1e29e8d7252cbd Mon Sep 17 00:00:00 2001 From: Mike Kruskal Date: Thu, 16 Feb 2023 09:30:31 -0800 Subject: [PATCH] Pull any new changes before pushing staleness updates. This fixes some relatively harmless flakiness in our post-submit. If two commits are made within ~5 minutes of each other, the `git push` command will fail because the git workspace isn't up to date. PiperOrigin-RevId: 510165977 --- push_auto_update.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/push_auto_update.sh b/push_auto_update.sh index 0d0e4371b0..9972da6acf 100755 --- a/push_auto_update.sh +++ b/push_auto_update.sh @@ -39,6 +39,7 @@ else commit_message="Auto-generate files" fi +git pull --rebase git add -A git diff --staged --quiet || git commit -am "$commit_message" git push