mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Skip updating timestamp when sync branch (#34875)
This commit is contained in:
		| @@ -41,11 +41,14 @@ func SyncRepoBranchesWithRepo(ctx context.Context, repo *repo_model.Repository, | ||||
| 	if err != nil { | ||||
| 		return 0, fmt.Errorf("GetObjectFormat: %w", err) | ||||
| 	} | ||||
| 	_, err = db.GetEngine(ctx).ID(repo.ID).Update(&repo_model.Repository{ObjectFormatName: objFmt.Name()}) | ||||
| 	if err != nil { | ||||
| 		return 0, fmt.Errorf("UpdateRepository: %w", err) | ||||
|  | ||||
| 	if repo.ObjectFormatName != objFmt.Name() { | ||||
| 		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]{} | ||||
| 	{ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user