mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-23 08:47:42 -05:00
5a18712dd7
* Fix a runtime error when modifying a repository through API call Using the `PATCH /repos/{owner}/{repo}` endpoint and attempting to modify `default_branch` on an empty repository will cause a panic. This commit adds a check for a nil pointer before attempting to dereference it. * Apply suggestions from code review * Apply suggestions from code review * Ensure that the git repository is loaded If you change the default branch for a repository you must change it in git too. Therefore you must open the repository before changing the default branch. Signed-off-by: Andrew Thornton <art27@cantab.net> * Allow empty repos to have their default branches changed Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Anton Khimich <anton.khimicha@mail.utoronto.ca> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Andrew Thornton <art27@cantab.net> |
||
---|---|---|
.. | ||
blob.go | ||
branch.go | ||
collaborators.go | ||
commits.go | ||
file.go | ||
fork.go | ||
git_hook.go | ||
git_ref.go | ||
hook.go | ||
hook_test.go | ||
issue.go | ||
issue_comment.go | ||
issue_label.go | ||
issue_reaction.go | ||
issue_stopwatch.go | ||
issue_subscription.go | ||
issue_tracked_time.go | ||
key.go | ||
label.go | ||
language.go | ||
main_test.go | ||
migrate.go | ||
milestone.go | ||
mirror.go | ||
pull.go | ||
pull_review.go | ||
release.go | ||
release_attachment.go | ||
release_tags.go | ||
repo.go | ||
repo_test.go | ||
star.go | ||
status.go | ||
subscriber.go | ||
tag.go | ||
teams.go | ||
topic.go | ||
transfer.go | ||
tree.go |