diff options
author | 6543 <6543@obermui.de> | 2022-04-21 17:17:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-21 17:17:57 +0200 |
commit | c764355676eb6d67674d095f92576a85688fe6cb (patch) | |
tree | a72d604c29b704744a8e5bac38b4fa47afa430c5 /routers/api/v1/repo/commits.go | |
parent | 225044e6563e4ed2b41d1aed8b3967755c064fbb (diff) | |
download | gitea-c764355676eb6d67674d095f92576a85688fe6cb.tar.gz gitea-c764355676eb6d67674d095f92576a85688fe6cb.zip |
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
Diffstat (limited to 'routers/api/v1/repo/commits.go')
-rw-r--r-- | routers/api/v1/repo/commits.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/routers/api/v1/repo/commits.go b/routers/api/v1/repo/commits.go index b6c47e0685..c79c34ec42 100644 --- a/routers/api/v1/repo/commits.go +++ b/routers/api/v1/repo/commits.go @@ -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, |