mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 19:38:23 +00:00 
			
		
		
		
	Fix API raw file content access for default branch (#2849)
This commit is contained in:
		| @@ -507,7 +507,11 @@ func getRefName(ctx *Context, pathType RepoRefType) string { | ||||
| 		if refName := getRefName(ctx, RepoRefTag); len(refName) > 0 { | ||||
| 			return refName | ||||
| 		} | ||||
| 		return getRefName(ctx, RepoRefCommit) | ||||
| 		if refName := getRefName(ctx, RepoRefCommit); len(refName) > 0 { | ||||
| 			return refName | ||||
| 		} | ||||
| 		ctx.Repo.TreePath = path | ||||
| 		return ctx.Repo.Repository.DefaultBranch | ||||
| 	case RepoRefBranch: | ||||
| 		return getRefNameFromPath(ctx, path, ctx.Repo.GitRepo.IsBranchExist) | ||||
| 	case RepoRefTag: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user