mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-04 22:57:34 -04:00
Skip updating timestamp when sync branch (#34875)
This commit is contained in:
parent
0af7a7b79f
commit
5d5b695527
@ -41,11 +41,14 @@ func SyncRepoBranchesWithRepo(ctx context.Context, repo *repo_model.Repository,
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, fmt.Errorf("GetObjectFormat: %w", err)
|
return 0, fmt.Errorf("GetObjectFormat: %w", err)
|
||||||
}
|
}
|
||||||
_, err = db.GetEngine(ctx).ID(repo.ID).Update(&repo_model.Repository{ObjectFormatName: objFmt.Name()})
|
|
||||||
if err != nil {
|
if repo.ObjectFormatName != objFmt.Name() {
|
||||||
return 0, fmt.Errorf("UpdateRepository: %w", err)
|
repo.ObjectFormatName = objFmt.Name()
|
||||||
|
_, err = db.GetEngine(ctx).ID(repo.ID).NoAutoTime().Update(&repo_model.Repository{ObjectFormatName: objFmt.Name()})
|
||||||
|
if err != nil {
|
||||||
|
return 0, fmt.Errorf("UpdateRepository: %w", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
repo.ObjectFormatName = objFmt.Name() // keep consistent with db
|
|
||||||
|
|
||||||
allBranches := container.Set[string]{}
|
allBranches := container.Set[string]{}
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user