Skip to content

Commit

Permalink
Remove unused user paramater (go-gitea#17723)
Browse files Browse the repository at this point in the history
As title
  • Loading branch information
Gusted authored and Stelios Malathouras committed Mar 28, 2022
1 parent 78ae65c commit ce5768f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions routers/web/repo/compare.go
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ func ParseCompareInfo(ctx *context.Context) *CompareInfo {
if canRead {
ctx.Data["RootRepo"] = rootRepo
if !fileOnly {
branches, tags, err := getBranchesAndTagsForRepo(ctx.User, rootRepo)
branches, tags, err := getBranchesAndTagsForRepo(rootRepo)
if err != nil {
ctx.ServerError("GetBranchesForRepo", err)
return nil
Expand All @@ -458,7 +458,7 @@ func ParseCompareInfo(ctx *context.Context) *CompareInfo {
if canRead {
ctx.Data["OwnForkRepo"] = ownForkRepo
if !fileOnly {
branches, tags, err := getBranchesAndTagsForRepo(ctx.User, ownForkRepo)
branches, tags, err := getBranchesAndTagsForRepo(ownForkRepo)
if err != nil {
ctx.ServerError("GetBranchesForRepo", err)
return nil
Expand Down Expand Up @@ -630,7 +630,7 @@ func PrepareCompareDiff(
return false
}

func getBranchesAndTagsForRepo(user *models.User, repo *models.Repository) (branches, tags []string, err error) {
func getBranchesAndTagsForRepo(repo *models.Repository) (branches, tags []string, err error) {
gitRepo, err := git.OpenRepository(repo.RepoPath())
if err != nil {
return nil, nil, err
Expand Down

0 comments on commit ce5768f

Please sign in to comment.