Browse Source

del

tags/v1.21.12.1
lewis 3 years ago
parent
commit
4c747deace
1 changed files with 0 additions and 19 deletions
  1. +0
    -19
      modules/git/repo_branch.go

+ 0
- 19
modules/git/repo_branch.go View File

@@ -76,25 +76,6 @@ func (repo *Repository) SetDefaultBranch(name string) error {
return err
}

// GetBranches returns all branches of the repository.
//func (repo *Repository) GetBranches() ([]string, error) {
// var branchNames []string
//
// branches, err := repo.gogitRepo.Branches()
// if err != nil {
// return nil, err
// }
//
// _ = branches.ForEach(func(branch *plumbing.Reference) error {
// branchNames = append(branchNames, strings.TrimPrefix(branch.Name().String(), BranchPrefix))
// return nil
// })
//
// // TODO: Sort?
//
// return branchNames, nil
//}

// GetBranch returns a branch by it's name
func (repo *Repository) GetBranch(branch string) (*Branch, error) {
if !repo.IsBranchExist(branch) {


Loading…
Cancel
Save