From e4ee30cb2dc1dda1066a84530a7b56b1c15b7904 Mon Sep 17 00:00:00 2001 From: Madhava Jay Date: Thu, 16 Nov 2023 15:11:34 +1000 Subject: [PATCH] Added repo.remotes.origin.fetch() to hagrid before calling checkout --- packages/hagrid/hagrid/lib.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/hagrid/hagrid/lib.py b/packages/hagrid/hagrid/lib.py index 0625dcef4d9..5c92e6f5a7a 100644 --- a/packages/hagrid/hagrid/lib.py +++ b/packages/hagrid/hagrid/lib.py @@ -217,6 +217,7 @@ def update_repo(repo: git.Repo, branch: str) -> None: try: if repo.is_dirty(): repo.git.reset("--hard") + repo.remotes.origin.fetch() repo.git.checkout(branch) repo.remotes.origin.pull() console.print(f"{OK_EMOJI} Updated HAGrid from branch: {branch}") @@ -241,6 +242,7 @@ def use_branch(branch: str) -> None: try: if repo.is_dirty(): repo.git.reset("--hard") + repo.remotes.origin.fetch() repo.git.checkout(branch) repo.remotes.origin.pull() except Exception as e: