]> source.dussan.org Git - gitea.git/commit
Set commit id when ref used explicitly (#26447)
authorJack Hay <jack@allspice.io>
Sat, 12 Aug 2023 07:33:12 +0000 (03:33 -0400)
committerGitHub <noreply@github.com>
Sat, 12 Aug 2023 07:33:12 +0000 (07:33 +0000)
commitc5888eb9854f5a04d5e796f2a53c64c9fc4c0cba
tree5d1ad281f4bf7cfcd58b951a769961e8c24d4c9f
parent9fc68b680feb49071c6c348be7701f1c79f5181d
Set commit id when ref used explicitly (#26447)

In the `RepoRefForAPI()` context function `CommitID` is not set if `ref`
is used. It is set correctly for other if/else branches where `Commit`
is set. It doesn't appear that any routes that use `RepoRefForAPI()`
also use `CommitID` but that may be the case in the future.

## Changes
- Sets `ctx.Repo.CommitID` when `ref` is explicitly used for api routes
that use `RepoRefForAPI()`
modules/context/api.go