Skip to content

chore: still keep ctx in git.Repository struct for cat-file batch command - #38684

Merged
bircni merged 7 commits into
go-gitea:mainfrom
wxiaoguang:fix-git-repo-ctx
Jul 28, 2026
Merged

chore: still keep ctx in git.Repository struct for cat-file batch command#38684
bircni merged 7 commits into
go-gitea:mainfrom
wxiaoguang:fix-git-repo-ctx

Conversation

@wxiaoguang

@wxiaoguang wxiaoguang commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Unfortunately, we can't completely remove the ctx from git.Repository, because the CatFileBatch still heavily depends on a parent context.

If we remove the Repository ctx, the CatFileBatch will become a mess and create a lot of unnecessary git processes.

http://localhost:3000/-/admin/monitor/perftrace

  • Before: open a repo home, dozens of git processes (duplicate cat-file)
  • After: only a few (no duplicate cat-file)

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jul 28, 2026
@github-actions github-actions Bot added the skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. label Jul 28, 2026
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jul 28, 2026
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jul 28, 2026
@bircni
bircni enabled auto-merge (squash) July 28, 2026 16:41
@bircni bircni added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jul 28, 2026
@bircni
bircni merged commit 4d6e172 into go-gitea:main Jul 28, 2026
23 checks passed
@GiteaBot GiteaBot added this to the 28.0.0 milestone Jul 28, 2026
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jul 28, 2026
@wxiaoguang
wxiaoguang deleted the fix-git-repo-ctx branch July 28, 2026 18:03
lunny added a commit to lunny/gitea that referenced this pull request Jul 29, 2026
…n test

OpenRepositoryLocal gained a cat-file batch context parameter in go-gitea#38684,
which broke the build of this package's tests after rebasing onto main.

Assisted-by: Codet
zjjhot added a commit to zjjhot/gitea that referenced this pull request Jul 30, 2026
* 'main' of https://github.com/go-gitea/gitea:
  chore: tweak AGENTS.md (go-gitea#38702)
  [skip ci] Updated translations via Crowdin
  fix: avoid markup render panic (go-gitea#38698)
  fix(ui): too many participants shown in commit avatar stacks (go-gitea#38689)
  [skip ci] Updated translations via Crowdin
  chore: still keep ctx in git.Repository struct for cat-file batch command (go-gitea#38684)
  feat: Add support for dynamic matrix evaluation in Gitea Actions workflows (go-gitea#36564)
  fix: Alpine registry APKINDEX.tar.gz returns 405 for HEAD requests [fj4WqyCCw3C5ShR1RfB7MoBPTpkRrBFYP1uT35g3MvT] (go-gitea#38686)
  fix: repo home page 500 due to the timeout of "get last commit info" (go-gitea#38678)
  [skip ci] Updated translations via Crowdin
  docs: Update Changelog for release v1.27.1 (go-gitea#38670)
  refactor(git): clarify GetBranch behavior to make it only gets an existing branch (go-gitea#38662)
  chore(deps): update dependencies (go-gitea#38660)
  feat: Add max-parallel Support for Gitea Actions (go-gitea#36357)
  fix: skip OIDC end-session after password login for OAuth2 users (go-gitea#38439)
  ci: set AWS_REGION for Cloudflare R2 upload steps (go-gitea#38658)
  fix: make Actions log parser support multiple line message encoding (go-gitea#38659)
  test(pubsub): stop racing the Redis SUBSCRIBE ack (go-gitea#38661)
  chore(ci): fix renovate custom manager regex (go-gitea#38656)
  feat: Replace SSE with WebSocket for UI notifications (go-gitea#36965)
zjjhot added a commit to zjjhot/gitea that referenced this pull request Jul 30, 2026
* main:
  chore: tweak AGENTS.md (go-gitea#38702)
  [skip ci] Updated translations via Crowdin
  fix: avoid markup render panic (go-gitea#38698)
  fix(ui): too many participants shown in commit avatar stacks (go-gitea#38689)
  [skip ci] Updated translations via Crowdin
  chore: still keep ctx in git.Repository struct for cat-file batch command (go-gitea#38684)
  feat: Add support for dynamic matrix evaluation in Gitea Actions workflows (go-gitea#36564)
  fix: Alpine registry APKINDEX.tar.gz returns 405 for HEAD requests [fj4WqyCCw3C5ShR1RfB7MoBPTpkRrBFYP1uT35g3MvT] (go-gitea#38686)
  fix: repo home page 500 due to the timeout of "get last commit info" (go-gitea#38678)
  [skip ci] Updated translations via Crowdin
  docs: Update Changelog for release v1.27.1 (go-gitea#38670)
  refactor(git): clarify GetBranch behavior to make it only gets an existing branch (go-gitea#38662)
  chore(deps): update dependencies (go-gitea#38660)
  feat: Add max-parallel Support for Gitea Actions (go-gitea#36357)
  fix: skip OIDC end-session after password login for OAuth2 users (go-gitea#38439)
  ci: set AWS_REGION for Cloudflare R2 upload steps (go-gitea#38658)
  fix: make Actions log parser support multiple line message encoding (go-gitea#38659)
  test(pubsub): stop racing the Redis SUBSCRIBE ack (go-gitea#38661)
  chore(ci): fix renovate custom manager regex (go-gitea#38656)
  feat: Replace SSE with WebSocket for UI notifications (go-gitea#36965)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants