diff options
author | Stan Hu <stanhu@gmail.com> | 2018-01-07 01:30:30 -0800 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-01-07 04:49:07 -0800 |
commit | c2b7147c2f4d600f066747d5a4388d2370c8a3e9 (patch) | |
tree | eb6193ea8b23b2af0552077ff3c3bd7fee8c3bd2 /lib | |
parent | 54bacb1860036ffcd722f7df033d7def6b1a8756 (diff) | |
download | gitlab-ce-c2b7147c2f4d600f066747d5a4388d2370c8a3e9.tar.gz |
Fix error 500 when viewing commit and merge request diffs
Due to the refactoring in !16082, `Blob#batch` no longer falls back
to a default `blob_size_limit`. Since `Repository#batch_blobs` was using
a default `nil` value, this would cause issues in the `Blob#find_by_rugged`
method.
This fix here is to be consistent and use a non-nil default value in
`Repository#batch_blobs`.
The problem was masked in development and tests because Gitaly is always
enabled by default for all features.
Closes #41735
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/git/repository.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb index 84105501d1e..d7605b74cf1 100644 --- a/lib/gitlab/git/repository.rb +++ b/lib/gitlab/git/repository.rb @@ -1187,7 +1187,7 @@ module Gitlab end # Items should be of format [[commit_id, path], [commit_id1, path1]] - def batch_blobs(items, blob_size_limit: nil) + def batch_blobs(items, blob_size_limit: Gitlab::Git::Blob::MAX_DATA_DISPLAY_SIZE) Gitlab::Git::Blob.batch(self, items, blob_size_limit: blob_size_limit) end |