forked from gitea/gitea
Sync branches when mirroring (#25722)
Caused by #22743 --------- Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
This commit is contained in:
parent
d17a848fe2
commit
45ac90eb54
|
@ -188,7 +188,6 @@ func InitFull(ctx context.Context) (err error) {
|
||||||
if CheckGitVersionAtLeast("2.9") == nil {
|
if CheckGitVersionAtLeast("2.9") == nil {
|
||||||
globalCommandArgs = append(globalCommandArgs, "-c", "credential.helper=")
|
globalCommandArgs = append(globalCommandArgs, "-c", "credential.helper=")
|
||||||
}
|
}
|
||||||
|
|
||||||
SupportProcReceive = CheckGitVersionAtLeast("2.29") == nil
|
SupportProcReceive = CheckGitVersionAtLeast("2.29") == nil
|
||||||
|
|
||||||
if setting.LFS.StartServer {
|
if setting.LFS.StartServer {
|
||||||
|
|
|
@ -307,6 +307,11 @@ func runSync(ctx context.Context, m *repo_model.Mirror) ([]*mirrorSyncResult, bo
|
||||||
return nil, false
|
return nil, false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.Trace("SyncMirrors [repo: %-v]: syncing branches...", m.Repo)
|
||||||
|
if _, err = repo_module.SyncRepoBranchesWithRepo(ctx, m.Repo, gitRepo, 0); err != nil {
|
||||||
|
log.Error("SyncMirrors [repo: %-v]: failed to synchronize branches: %v", m.Repo, err)
|
||||||
|
}
|
||||||
|
|
||||||
log.Trace("SyncMirrors [repo: %-v]: syncing releases with tags...", m.Repo)
|
log.Trace("SyncMirrors [repo: %-v]: syncing releases with tags...", m.Repo)
|
||||||
if err = repo_module.SyncReleasesWithTags(m.Repo, gitRepo); err != nil {
|
if err = repo_module.SyncReleasesWithTags(m.Repo, gitRepo); err != nil {
|
||||||
log.Error("SyncMirrors [repo: %-v]: failed to synchronize tags to releases: %v", m.Repo, err)
|
log.Error("SyncMirrors [repo: %-v]: failed to synchronize tags to releases: %v", m.Repo, err)
|
||||||
|
|
Loading…
Reference in New Issue