Skip to content

Only git operations should update the updated_unix column in repository table #34388

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lunny
Copy link
Member

@lunny lunny commented May 7, 2025

Try to fix #32046

@lunny lunny added type/bug backport/v1.23 This PR should be backported to Gitea 1.23 backport/v1.24 This PR should be backported to Gitea 1.24 labels May 7, 2025
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 7, 2025
@github-actions github-actions bot added the modifies/go Pull requests that update Go code label May 7, 2025
@silverwind
Copy link
Member

I agree we should match Github behaviour and only update timestamp when git content changes. It's the most straightforward way to view this timestamp.

@silverwind
Copy link
Member

silverwind commented May 8, 2025

Question is thought, shouldn't we make UpdateRepositoryCols default to not writing that timestamp and we could remove UpdateRepositoryColsNoAutoTime? If separate function is needed, I recommend naming it UpdateRepositoryColsWithAutoTime to indicate that auto-time behaviour is being opted in.

Also, as seen by the diff, there are a few places that don't use UpdateRepositoryCols, can we make them use it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/v1.23 This PR should be backported to Gitea 1.23 backport/v1.24 This PR should be backported to Gitea 1.24 lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. modifies/go Pull requests that update Go code type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unclear repository update time: some inactive or archived repositories may get a recent "update time"
3 participants