mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
fix: use git pull --ff-only in update/install to avoid divergent branch error
Fresh installs without pull.rebase configured hit a git error when running hermes update because git doesn't know how to reconcile divergent branches. --ff-only is the right strategy: it works for the normal case (local branch is behind remote) and fails cleanly if the user somehow has local commits, rather than silently rebasing them.
This commit is contained in:
parent
d560f2d1f2
commit
870ebb8850
2 changed files with 2 additions and 2 deletions
|
|
@ -2688,7 +2688,7 @@ def cmd_update(args):
|
|||
|
||||
print("→ Pulling updates...")
|
||||
try:
|
||||
subprocess.run(git_cmd + ["pull", "origin", branch], cwd=PROJECT_ROOT, check=True)
|
||||
subprocess.run(git_cmd + ["pull", "--ff-only", "origin", branch], cwd=PROJECT_ROOT, check=True)
|
||||
finally:
|
||||
if auto_stash_ref is not None:
|
||||
_restore_stashed_changes(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue