Skip to content

The agent that grows with you

fix(update): narrow the source target's branch before building the refspec

kshitijk4poor57fba5f77244
diff --git a/hermes_cli/update_cmd.py b/hermes_cli/update_cmd.py
index 535b5a220a9..9b297bc1ba8 100644
--- a/hermes_cli/update_cmd.py
+++ b/hermes_cli/update_cmd.py
@@ -1344,6 +1344,7 @@ def _cmd_update_impl(args, gateway_mode: bool):
target_ref = release_sha
completion_request["expected_sha"] = release_sha
else:
+ assert target.branch is not None # a SourceTarget without a commit names its branch
branch = target.branch
completion_request["branch"] = branch
target_ref = f"origin/{branch}"