Remove unused user paramater (#17723)

As title
This commit is contained in:
Gusted 2021-11-19 08:37:13 +00:00 committed by GitHub
parent e4b95de388
commit 00448ebe91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

AI 샘플 코드 생성 중입니다

Loading...

View File

@ -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