We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 579a0a0 commit 648a2a4Copy full SHA for 648a2a4
services/repository/files/file.go
@@ -23,7 +23,7 @@ func GetContentsListFromTrees(ctx context.Context, repo *repo_model.Repository,
23
var size int64
24
for _, file := range treeNames {
25
fileContents, _ := GetContents(ctx, repo, file, branch, false) // ok if fails, then will be nil
26
- if *fileContents.Content != "" {
+ if fileContents != nil && *fileContents.Content != "" {
27
size += fileContents.Size // if content isn't empty (e. g. due to the single blob being too large), add file size to response size
28
}
29
if size > setting.API.DefaultMaxResponseSize {
0 commit comments