Commit 744740f0 authored by Stan Hu's avatar Stan Hu

Merge branch 'rd-fix-bug-when-authenticating-user-for-repo-with-size-check-enabled' into 'master'

Fix error when trying to authenticate user on repo with size check enabled

Closes gitlab-ce#50118

See merge request gitlab-org/gitlab-ee!6848
parents e6ebe4f0 8fa54d95
...@@ -226,6 +226,12 @@ For more information: #{EE::Gitlab::GeoGitAccess::GEO_SERVER_DOCS_URL}" ...@@ -226,6 +226,12 @@ For more information: #{EE::Gitlab::GeoGitAccess::GEO_SERVER_DOCS_URL}"
project.update_attribute(:repository_size_limit, 2.megabytes) project.update_attribute(:repository_size_limit, 2.megabytes)
end end
context 'when trying to authenticate the user' do
it 'does not raise an error' do
expect { push_changes }.not_to raise_error
end
end
context 'when pushing a new branch' do context 'when pushing a new branch' do
it 'accepts the push' do it 'accepts the push' do
master_sha = project.commit('master').id master_sha = project.commit('master').id
......
...@@ -382,7 +382,7 @@ module Gitlab ...@@ -382,7 +382,7 @@ module Gitlab
end end
def new_blobs(newrev) def new_blobs(newrev)
return [] if newrev == ::Gitlab::Git::BLANK_SHA return [] if newrev.blank? || newrev == ::Gitlab::Git::BLANK_SHA
strong_memoize("new_blobs_#{newrev}") do strong_memoize("new_blobs_#{newrev}") do
wrapped_gitaly_errors do wrapped_gitaly_errors do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment