Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrasimir Angelov <kangelov@gitlab.com>2019-06-06 15:39:46 +0300
committerKrasimir Angelov <kangelov@gitlab.com>2019-06-06 15:39:46 +0300
commitb8704dce72fd8992b1f785c0ffa2f2c0eab81334 (patch)
tree203686a6e2c95c88857d5f71dd748d4fa715887e /app/models/project_ci_cd_setting.rb
parentc0a812ecb74f1fd519d096d8be36f0a2436adc94 (diff)
Comment why forks get default_git_depth of 0 instead nil
and simplify ProjectCiCdSetting#set_default_git_depth
Diffstat (limited to 'app/models/project_ci_cd_setting.rb')
-rw-r--r--app/models/project_ci_cd_setting.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/models/project_ci_cd_setting.rb b/app/models/project_ci_cd_setting.rb
index 9e7d921c229..492d50766ea 100644
--- a/app/models/project_ci_cd_setting.rb
+++ b/app/models/project_ci_cd_setting.rb
@@ -31,8 +31,6 @@ class ProjectCiCdSetting < ApplicationRecord
private
def set_default_git_depth
- return if default_git_depth
-
- self.default_git_depth = DEFAULT_GIT_DEPTH
+ self.default_git_depth ||= DEFAULT_GIT_DEPTH
end
end