Near ready

This commit is contained in:
Antoine GIRARD 2016-01-15 19:24:03 +01:00
parent 566163ab82
commit c11c3b6c11
5 changed files with 134 additions and 1 deletions

View file

@ -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