diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2025-05-11 12:18:46 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-11 19:18:46 +0000 |
commit | 780e92ea99646dfefbe11734a4845fbf304be83c (patch) | |
tree | 3c008247a169af266012dd9afb2a6fa20515b5bb /models/repo/update.go | |
parent | b07e03956af8f29464067b19cb5cacee358b592f (diff) | |
download | gitea-780e92ea99646dfefbe11734a4845fbf304be83c.tar.gz gitea-780e92ea99646dfefbe11734a4845fbf304be83c.zip |
Only git operations should update `last changed` of a repository (#34388)
Try to fix #32046
Diffstat (limited to 'models/repo/update.go')
-rw-r--r-- | models/repo/update.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/models/repo/update.go b/models/repo/update.go index 15c8c48d5b..8a15477a80 100644 --- a/models/repo/update.go +++ b/models/repo/update.go @@ -25,7 +25,7 @@ func UpdateRepositoryOwnerNames(ctx context.Context, ownerID int64, ownerName st } defer committer.Close() - if _, err := db.GetEngine(ctx).Where("owner_id = ?", ownerID).Cols("owner_name").Update(&Repository{ + if _, err := db.GetEngine(ctx).Where("owner_id = ?", ownerID).Cols("owner_name").NoAutoTime().Update(&Repository{ OwnerName: ownerName, }); err != nil { return err @@ -40,8 +40,8 @@ func UpdateRepositoryUpdatedTime(ctx context.Context, repoID int64, updateTime t return err } -// UpdateRepositoryCols updates repository's columns -func UpdateRepositoryCols(ctx context.Context, repo *Repository, cols ...string) error { +// UpdateRepositoryColsWithAutoTime updates repository's columns +func UpdateRepositoryColsWithAutoTime(ctx context.Context, repo *Repository, cols ...string) error { _, err := db.GetEngine(ctx).ID(repo.ID).Cols(cols...).Update(repo) return err } |