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>
(cherry picked from commit 02582c6956)
This commit is contained in:
Anders Kaseorg
2021-08-31 18:17:38 -07:00
committed by Tim Abbott
parent 5feba78939
commit 26f4ab9a9d

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(