fix: use git pull --ff-only in update/install to avoid divergent branch error (#2274)
fix: use git pull --rebase in update/install to avoid divergent branch error
This commit is contained in:
commit
651e92fbbf
2 changed files with 2 additions and 2 deletions
|
|
@ -2688,7 +2688,7 @@ def cmd_update(args):
|
||||||
|
|
||||||
print("→ Pulling updates...")
|
print("→ Pulling updates...")
|
||||||
try:
|
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:
|
finally:
|
||||||
if auto_stash_ref is not None:
|
if auto_stash_ref is not None:
|
||||||
_restore_stashed_changes(
|
_restore_stashed_changes(
|
||||||
|
|
|
||||||
|
|
@ -577,7 +577,7 @@ clone_repo() {
|
||||||
|
|
||||||
git fetch origin
|
git fetch origin
|
||||||
git checkout "$BRANCH"
|
git checkout "$BRANCH"
|
||||||
git pull origin "$BRANCH"
|
git pull --ff-only origin "$BRANCH"
|
||||||
|
|
||||||
if [ -n "$autostash_ref" ]; then
|
if [ -n "$autostash_ref" ]; then
|
||||||
local restore_now="yes"
|
local restore_now="yes"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue