mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-08 05:53:23 +09:00
This commit is contained in:
@@ -1617,7 +1617,7 @@ func GetPullRequestFiles(ctx *context.APIContext) {
|
||||
limit = max(limit, 0)
|
||||
|
||||
apiFiles := make([]*api.ChangedFile, 0, limit)
|
||||
for i := start; i < start+limit; i++ {
|
||||
for i := start; i < start+limit && i < len(diff.Files); i++ {
|
||||
// refs/pull/1/head stores the HEAD commit ID, allowing all related commits to be found in the base repository.
|
||||
// The head repository might have been deleted, so we should not rely on it here.
|
||||
apiFiles = append(apiFiles, convert.ToChangedFile(diff.Files[i], pr.BaseRepo, endCommitID))
|
||||
|
||||
Reference in New Issue
Block a user