Skip to content

Commit 00448eb

Browse files
author
Gusted
authored
Remove unused user paramater (#17723)
As title
1 parent e4b95de commit 00448eb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

routers/web/repo/compare.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ func ParseCompareInfo(ctx *context.Context) *CompareInfo {
433433
if canRead {
434434
ctx.Data["RootRepo"] = rootRepo
435435
if !fileOnly {
436-
branches, tags, err := getBranchesAndTagsForRepo(ctx.User, rootRepo)
436+
branches, tags, err := getBranchesAndTagsForRepo(rootRepo)
437437
if err != nil {
438438
ctx.ServerError("GetBranchesForRepo", err)
439439
return nil
@@ -458,7 +458,7 @@ func ParseCompareInfo(ctx *context.Context) *CompareInfo {
458458
if canRead {
459459
ctx.Data["OwnForkRepo"] = ownForkRepo
460460
if !fileOnly {
461-
branches, tags, err := getBranchesAndTagsForRepo(ctx.User, ownForkRepo)
461+
branches, tags, err := getBranchesAndTagsForRepo(ownForkRepo)
462462
if err != nil {
463463
ctx.ServerError("GetBranchesForRepo", err)
464464
return nil
@@ -630,7 +630,7 @@ func PrepareCompareDiff(
630630
return false
631631
}
632632

633-
func getBranchesAndTagsForRepo(user *models.User, repo *models.Repository) (branches, tags []string, err error) {
633+
func getBranchesAndTagsForRepo(repo *models.Repository) (branches, tags []string, err error) {
634634
gitRepo, err := git.OpenRepository(repo.RepoPath())
635635
if err != nil {
636636
return nil, nil, err

0 commit comments

Comments
 (0)