mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
RepoAssignment ensure to close before overwrite (#19449)
* check if GitRepo already open and close if * only run RepoAssignment once * refactor context helper for api to open GitRepo
This commit is contained in:
@@ -269,6 +269,7 @@ func DownloadCommitDiffOrPatch(ctx *context.APIContext) {
|
||||
// "404":
|
||||
// "$ref": "#/responses/notFound"
|
||||
repoPath := repo_model.RepoPath(ctx.Repo.Owner.Name, ctx.Repo.Repository.Name)
|
||||
// TODO: use gitRepo from context
|
||||
if err := git.GetRawDiff(
|
||||
ctx,
|
||||
repoPath,
|
||||
|
Reference in New Issue
Block a user