aboutsummaryrefslogtreecommitdiffstats
path: root/modules/gitrepo/branch.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gitrepo/branch.go')
-rw-r--r--modules/gitrepo/branch.go16
1 files changed, 2 insertions, 14 deletions
diff --git a/modules/gitrepo/branch.go b/modules/gitrepo/branch.go
index 9c4bdc5bdf..d7857819e4 100644
--- a/modules/gitrepo/branch.go
+++ b/modules/gitrepo/branch.go
@@ -11,14 +11,14 @@ import (
// GetBranchesByPath returns a branch by its path
// if limit = 0 it will not limit
-func GetBranchesByPath(ctx context.Context, repo Repository, skip, limit int) ([]*git.Branch, int, error) {
+func GetBranchesByPath(ctx context.Context, repo Repository, skip, limit int) ([]string, int, error) {
gitRepo, err := OpenRepository(ctx, repo)
if err != nil {
return nil, 0, err
}
defer gitRepo.Close()
- return gitRepo.GetBranches(skip, limit)
+ return gitRepo.GetBranchNames(skip, limit)
}
func GetBranchCommitID(ctx context.Context, repo Repository, branch string) (string, error) {
@@ -44,24 +44,12 @@ func GetDefaultBranch(ctx context.Context, repo Repository) (string, error) {
return git.GetDefaultBranch(ctx, repoPath(repo))
}
-func GetWikiDefaultBranch(ctx context.Context, repo Repository) (string, error) {
- return git.GetDefaultBranch(ctx, wikiPath(repo))
-}
-
// IsReferenceExist returns true if given reference exists in the repository.
func IsReferenceExist(ctx context.Context, repo Repository, name string) bool {
return git.IsReferenceExist(ctx, repoPath(repo), name)
}
-func IsWikiReferenceExist(ctx context.Context, repo Repository, name string) bool {
- return git.IsReferenceExist(ctx, wikiPath(repo), name)
-}
-
// IsBranchExist returns true if given branch exists in the repository.
func IsBranchExist(ctx context.Context, repo Repository, name string) bool {
return IsReferenceExist(ctx, repo, git.BranchPrefix+name)
}
-
-func IsWikiBranchExist(ctx context.Context, repo Repository, name string) bool {
- return IsWikiReferenceExist(ctx, repo, git.BranchPrefix+name)
-}