Only git operations should update last changed of a repository (#34388)

Try to fix #32046
This commit is contained in:
Lunny Xiao authored and GitHub committed 2025-05-11 19:18:46 +00:00
1 parent b07e03956a
commit 780e92ea99
19 files changed
+28 -33

No files matched your search

+1 -1
View File
@@ -306,7 +306,7 @@ func ChangeRepoFiles(ctx context.Context, repo *repo_model.Repository, doer *use
if repo.IsEmpty {
if isEmpty, err := gitRepo.IsEmpty(); err == nil && !isEmpty {
_ = repo_model.UpdateRepositoryCols(ctx, &repo_model.Repository{ID: repo.ID, IsEmpty: false, DefaultBranch: opts.NewBranch}, "is_empty", "default_branch")
_ = repo_model.UpdateRepositoryColsWithAutoTime(ctx, &repo_model.Repository{ID: repo.ID, IsEmpty: false, DefaultBranch: opts.NewBranch}, "is_empty", "default_branch")
}
}