aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGusted <williamzijl7@hotmail.com>2021-11-19 08:37:13 +0000
committerGitHub <noreply@github.com>2021-11-19 08:37:13 +0000
commit00448ebe9184ccfe9e2fd7f48f9b266ae91d6415 (patch)
tree623353787ea8d4195b56eb6871b18b54aa919a77
parente4b95de38856fac845c21348971e3c5343ceac15 (diff)
downloadgitea-00448ebe9184ccfe9e2fd7f48f9b266ae91d6415.tar.gz
gitea-00448ebe9184ccfe9e2fd7f48f9b266ae91d6415.zip
Remove unused `user` paramater (#17723)
As title
-rw-r--r--routers/web/repo/compare.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/web/repo/compare.go b/routers/web/repo/compare.go
index 01c324e9e9..3d55e1e8ff 100644
--- a/routers/web/repo/compare.go
+++ b/routers/web/repo/compare.go
@@ -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
@@ -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
@@ -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