Commit Graph

7 Commits (faa676cc8b4419ac56fbf9d009ea8c6b79834024)

Author SHA1 Message Date
xenofem d1562bfc34
properly set symbolic-ref HEAD when a repo is created with a non-master default branch ()
This fixes an issue I noticed with : when you create a repo with a non-master default branch, gitea doesn't change the remote ref HEAD, so it still points at refs/heads/master. As a result, cloning my repos gives me error messages and doesn't check out the desired default branch, so I need to manually check it out after cloning.
techknowlogick 6bf78d2b57
Global default branch setting ()
* Global default branch setting

* add to app.ini example per @silverwind

* update per @lunny

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
j.yao.SUSE b252b23f16
[feature] provide `OwnerName` field for README template ()
Co-Authored-By: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
zeripath 52cfd2743c
Option to set default branch at repository creation ()
* Option to set default branch at repository creation
* Handle template repos with non-default master branch
* Add DefaultBranch handling on creation to API

Fix 

Signed-off-by: Andrew Thornton <art27@cantab.net>
Lunny Xiao d92781bf94 Refactor repository check and sync functions ()
Move more general repository functions out of models/repo.go
zeripath 66ee9b87f9 Add require signed commit for protected branch ()
* Add require signed commit for protected branch

* Fix fmt

* Make editor show if they will be signed

* bugfix

* Add basic merge check and better information for CRUD

* linting comment

* Add descriptors to merge signing

* Slight refactor

* Slight improvement to appearances

* Handle Merge API

* manage CRUD API

* Move error to error.go

* Remove fix to delete.go

* prep for merge

* need to tolerate \r\n in message

* check protected branch before trying to load it

* Apply suggestions from code review

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

* fix commit-reader

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Lunny Xiao b465d0d787
Move create/fork repository from models to modules/repository ()
* Move create/fork repository from models to modules/repository

* fix wrong reference

* fix test

* fix test

* fix lint

* Fix DBContext

* remove duplicated TestMain

* fix lint

* fix conflicts