forgejo/routers/api
Lunny Xiao bc64b6f004
Use gitrepo.GetTreePathLatestCommit to get file lastest commit instead from latest commit cache (#32987)
The latest commit cache is currently used only for listing tree files.
However, a cold start may take longer than directly invoking the Git
command. This PR addresses the issue of slow response times when
accessing raw files, improving performance in such scenarios.

```log
gitea.log:105521:2024/12/23 08:22:18 ...eb/routing/logger.go:68:func1() [W] router: slow      GET /xxxx/xxxxxx/raw/commit/xxxxxxxxxxxxxxxxxxxxxxxxxxx/.editorconfig for 172.18.0.5:53252, elapsed 3526.8ms @ repo/download.go:117(repo.SingleDownload)
```

(cherry picked from commit f4ccbd38dca77b1515a08ddf927f4f20cf644d30)
2025-01-05 12:13:48 +00:00
..
actions Fix missing outputs for jobs with matrix (#32823) 2024-12-15 10:14:21 +01:00
forgejo/v1 Fix #2512 /api/forgejo/v1/version auth check (#2582) 2024-03-19 07:16:19 +00:00
packages Add standard-compliant route to serve outdated R packages (#32783) 2024-12-15 09:12:46 +01:00
shared Fix #2512 /api/forgejo/v1/version auth check (#2582) 2024-03-19 07:16:19 +00:00
v1 Use gitrepo.GetTreePathLatestCommit to get file lastest commit instead from latest commit cache (#32987) 2025-01-05 12:13:48 +00:00