Compare commits

..

No commits in common. "69d98f83f9a62a7e70976b5d973f293f73e42266" and "6447b3e6b29c8cb264a1ba1db034350a3c4fbd1b" have entirely different histories.

2 changed files with 6 additions and 3 deletions

View File

@ -850,7 +850,7 @@ func getRefName(ctx *Base, repo *Repository, pathType RepoRefType) string {
return getRefNameFromPath(ctx, repo, path, func(s string) bool {
b, exist, err := git_model.FindRenamedBranch(ctx, repo.Repository.ID, s)
if err != nil {
log.Error("FindRenamedBranch: %v", err)
log.Error("FindRenamedBranch", err)
return false
}

View File

@ -716,11 +716,14 @@ func checkCitationFile(ctx *context.Context, entry *git.TreeEntry) {
return
}
defer dataRc.Close()
ctx.PageData["citationFileContent"], err = blob.GetBlobContent(setting.UI.MaxDisplayFileSize)
buf := make([]byte, 1024)
n, err := util.ReadAtMost(dataRc, buf)
if err != nil {
ctx.ServerError("GetBlobContent", err)
ctx.ServerError("ReadAtMost", err)
return
}
buf = buf[:n]
ctx.PageData["citationFileContent"] = string(buf)
break
}
}