diff options
author | Robert Speicher <robert@gitlab.com> | 2016-04-19 19:21:50 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2016-04-19 19:21:50 +0000 |
commit | 6a19467c415487ae786df12b04f62647132986ac (patch) | |
tree | c31019e807dd09fbdcd8c5b88cfceabe14097e8c /app/models/commit.rb | |
parent | f1e778be48c36fb26670325e61acb4ed12785b7d (diff) | |
parent | 6970612bcc5b9a74c00abea129a8afc7cbe681bb (diff) | |
download | gitlab-ce-6a19467c415487ae786df12b04f62647132986ac.tar.gz |
Merge branch '15139-fix-constants-redefinition-warnings' into 'master'
Define constants only if not defined yet and freeze them
Fixes #15139.
See merge request !3810
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r-- | app/models/commit.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb index b406a4dd8d2..6bb018b086f 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -15,8 +15,8 @@ class Commit DIFF_SAFE_LINES = Gitlab::Git::DiffCollection::DEFAULT_LIMITS[:max_lines] # Commits above this size will not be rendered in HTML - DIFF_HARD_LIMIT_FILES = 1000 unless defined?(DIFF_HARD_LIMIT_FILES) - DIFF_HARD_LIMIT_LINES = 50000 unless defined?(DIFF_HARD_LIMIT_LINES) + DIFF_HARD_LIMIT_FILES = 1000 + DIFF_HARD_LIMIT_LINES = 50000 class << self def decorate(commits, project) |