Skip to content

POC: Rework update file via git fast-import #34293

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

lunny
Copy link
Member

@lunny lunny commented Apr 27, 2025

This PR introduced a new implementation for online files changes.

The previous implementation will clone the repository and use git index. This will take much time if the repository is big.
The new implementation is based on git fast-import which can run in bare repository and without checkout.

Pros

  • High performance when importing many files

Cons

  • Hooks will not be triggered directly by git
  • No git transaction guaranteed. i.e. Gitea needs the hooks to sync branches names to database

@lunny lunny added the performance/speed performance issues with slow downs label Apr 27, 2025
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 27, 2025
@lunny lunny added this to the 1.25.0 milestone Apr 27, 2025
@github-actions github-actions bot added modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code labels Apr 27, 2025
@lunny lunny removed this from the 1.25.0 milestone Apr 27, 2025
@lunny lunny changed the title Rework update file via git fast-import POC: Rework update file via git fast-import Apr 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code performance/speed performance issues with slow downs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants