forgejo/routers/web
Gusted 74981d9e97 chore: Refactor Is{Reference,Branch}Exist (#8425)
- Instead of invoking a new git command to check if a reference exists, use the already opened git repository that uses a batch check to check if the reference exists.
- Instead of invoking a new git command to check if a branch exists, use the already opened git repository that uses a batch check to check if the branch exists.
- Do not depend on `IsReferenceExist` as its no longer used by any other function.
- Specify `--quiet` to not waste Git's time on printing something we do not use.
- Run it via `Run` so no buffers are created for stdout and stderr.
- Add a test that verifies `IsBranchExist` works and does not work for other types of references.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8425
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-07-06 07:16:43 +02:00
..
admin feat(ui): show size constraints of custom avatar (#7998) 2025-06-14 16:35:50 +02:00
auth fix: remove trailing slash from the issuer in oauth claims (#8028) 2025-06-10 20:46:17 +02:00
devtest chore(ui): clean up hashbox CSS, small design changes (#7822) 2025-05-25 12:51:27 +02:00
events
explore fix(ui): Improve chronological sorting of user (#7596) 2025-05-02 20:33:57 +02:00
feed Update module github.com/jhillyerd/enmime/v2 to v2.2.0 (forgejo) (#8254) 2025-06-26 08:49:20 +02:00
healthcheck
misc feat: bump the minimum required Git version from 2.0.0 to 2.34.1 (#8328) 2025-06-29 00:44:18 +02:00
moderation feat!: Abusive content reporting (#6977) 2025-05-18 08:05:16 +00:00
org blob: use NewTruncatedReader for markdown 2025-06-20 20:43:10 +02:00
repo chore: Refactor Is{Reference,Branch}Exist (#8425) 2025-07-06 07:16:43 +02:00
shared fix: show membership of limited orgs 2025-06-06 19:33:26 +02:00
user feat: detect Interlisp sources as text (#8377) 2025-07-02 07:38:46 +02:00
base.go
githttp.go
goget.go
home.go
metrics.go
nodeinfo.go
swagger_json.go
web.go Implement single-commit PR review flow (#7155) 2025-06-17 09:31:50 +02:00
webfinger.go Improved signature handling & instance actor (#8275) 2025-07-01 19:49:00 +02:00