mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-04 05:18:25 +00:00 
			
		
		
		
	@@ -433,7 +433,7 @@ func ParseCompareInfo(ctx *context.Context) *CompareInfo {
 | 
				
			|||||||
		if canRead {
 | 
							if canRead {
 | 
				
			||||||
			ctx.Data["RootRepo"] = rootRepo
 | 
								ctx.Data["RootRepo"] = rootRepo
 | 
				
			||||||
			if !fileOnly {
 | 
								if !fileOnly {
 | 
				
			||||||
				branches, tags, err := getBranchesAndTagsForRepo(ctx.User, rootRepo)
 | 
									branches, tags, err := getBranchesAndTagsForRepo(rootRepo)
 | 
				
			||||||
				if err != nil {
 | 
									if err != nil {
 | 
				
			||||||
					ctx.ServerError("GetBranchesForRepo", err)
 | 
										ctx.ServerError("GetBranchesForRepo", err)
 | 
				
			||||||
					return nil
 | 
										return nil
 | 
				
			||||||
@@ -458,7 +458,7 @@ func ParseCompareInfo(ctx *context.Context) *CompareInfo {
 | 
				
			|||||||
		if canRead {
 | 
							if canRead {
 | 
				
			||||||
			ctx.Data["OwnForkRepo"] = ownForkRepo
 | 
								ctx.Data["OwnForkRepo"] = ownForkRepo
 | 
				
			||||||
			if !fileOnly {
 | 
								if !fileOnly {
 | 
				
			||||||
				branches, tags, err := getBranchesAndTagsForRepo(ctx.User, ownForkRepo)
 | 
									branches, tags, err := getBranchesAndTagsForRepo(ownForkRepo)
 | 
				
			||||||
				if err != nil {
 | 
									if err != nil {
 | 
				
			||||||
					ctx.ServerError("GetBranchesForRepo", err)
 | 
										ctx.ServerError("GetBranchesForRepo", err)
 | 
				
			||||||
					return nil
 | 
										return nil
 | 
				
			||||||
@@ -630,7 +630,7 @@ func PrepareCompareDiff(
 | 
				
			|||||||
	return false
 | 
						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())
 | 
						gitRepo, err := git.OpenRepository(repo.RepoPath())
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		return nil, nil, err
 | 
							return nil, nil, err
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user