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:
@@ -577,7 +577,7 @@ clone_repo() {
|
||||
|
||||
git fetch origin
|
||||
git checkout "$BRANCH"
|
||||
git pull origin "$BRANCH"
|
||||
git pull --ff-only origin "$BRANCH"
|
||||
|
||||
if [ -n "$autostash_ref" ]; then
|
||||
local restore_now="yes"
|
||||
|
||||
Reference in New Issue
Block a user