mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-07-07 18:05:40 +02:00
- 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> |
||
---|---|---|
.. | ||
check.go | ||
check_test.go | ||
comment.go | ||
commit_status.go | ||
commit_status_test.go | ||
edits.go | ||
lfs.go | ||
main_test.go | ||
merge.go | ||
merge_ff_only.go | ||
merge_merge.go | ||
merge_prepare.go | ||
merge_rebase.go | ||
merge_squash.go | ||
merge_test.go | ||
patch.go | ||
patch_test.go | ||
patch_unmerged.go | ||
pull.go | ||
pull_test.go | ||
review.go | ||
review_test.go | ||
temp_repo.go | ||
update.go | ||
update_rebase.go |