git 逻辑

This commit is contained in:
2026-06-10 15:30:52 +08:00
parent 41f2a84979
commit 023ab2f30e
17 changed files with 221 additions and 64 deletions
+5 -1
View File
@@ -803,7 +803,11 @@ func (a workspaceFetcherAdapter) Fetch(ctx context.Context, mainPath string, wsI
if err != nil {
return err
}
return a.gitr.Fetch(ctx, mainPath, cred)
// 后台 fetch 成功后与手动 Sync 一致地把 main 工作区快进到远端
if err := a.gitr.Fetch(ctx, mainPath, cred); err != nil {
return err
}
return a.gitr.MergeFFOnly(ctx, mainPath)
}
// projectLookup is the minimal interface needed by worktreePruneAdapter to