mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-02 16:35:26 -04:00
Near ready
This commit is contained in:
parent
566163ab82
commit
c11c3b6c11
5 changed files with 134 additions and 1 deletions
|
@ -288,6 +288,20 @@ func (repo *Repository) GetMirror() (err error) {
|
|||
return err
|
||||
}
|
||||
|
||||
func (repo *Repository) GetBranch(br string) (_ *Branch, err error) {
|
||||
if(!git.IsBranchExist(repo.RepoPath(), br)){
|
||||
return nil, errors.New("Branch do not exist");
|
||||
}
|
||||
return &Branch{
|
||||
Path: repo.RepoPath(),
|
||||
Name: br,
|
||||
},nil
|
||||
}
|
||||
|
||||
func (repo *Repository) GetBranches() (_ []*Branch, err error) {
|
||||
return GetBranchesByPath(repo.RepoPath())
|
||||
}
|
||||
|
||||
func (repo *Repository) GetBaseRepo() (err error) {
|
||||
if !repo.IsFork {
|
||||
return nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue