git-sync-web 自动提交 2026-09-08 17:33:08
This commit is contained in:
@@ -594,6 +594,13 @@ func (e *Engine) syncOnce(s *repoState, trigger string) {
|
||||
s.mu.Unlock()
|
||||
e.pushStatus(s)
|
||||
|
||||
if ahead > 0 && (cfg.Mode == "push" || cfg.Mode == "both") {
|
||||
if !e.pushAll(s, cfg, ahead) {
|
||||
// 推送失败,本轮终止,避免继续拉取加剧分叉
|
||||
e.setFail(s, "推送失败,本轮同步已终止(跳过拉取以避免分叉加剧)")
|
||||
return
|
||||
}
|
||||
}
|
||||
if behind > 0 && (cfg.Mode == "pull" || cfg.Mode == "both") {
|
||||
if !e.pullRemote(s, cfg, remote, behind) {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user