upgrade-zulip-from-git: Run git fetch with --prune.

This prevents upgrading to an obsolete version of a branch that has
been deleted or renamed.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2021-08-31 18:17:38 -07:00 committed by Tim Abbott
parent 66aa2a2505
commit 02582c6956
1 changed files with 3 additions and 1 deletions

View File

@ -81,7 +81,9 @@ try:
)
logging.info("Fetching the latest commits")
subprocess.check_call(["git", "fetch", "-q", "--tags", "--all"], preexec_fn=su_to_zulip)
subprocess.check_call(
["git", "fetch", "--prune", "--quiet", "--tags", "--all"], preexec_fn=su_to_zulip
)
# Generate the deployment directory via git worktree from our local repository.
subprocess.check_call(