summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/services/projects/update_service.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/services/projects/update_service.rb b/app/services/projects/update_service.rb
index 679f4a9cb62..0e489ec5e86 100644
--- a/app/services/projects/update_service.rb
+++ b/app/services/projects/update_service.rb
@@ -17,6 +17,8 @@ module Projects
ensure_wiki_exists if enabling_wiki?
+ yield if block_given?
+
if project.update_attributes(params.except(:default_branch))
if project.previous_changes.include?('path')
project.rename_repo
@@ -53,8 +55,8 @@ module Projects
def changing_default_branch?
new_branch = params[:default_branch]
- project.repository.exists? &&
- new_branch && new_branch != project.default_branch
+ new_branch && project.repository.exists? &&
+ new_branch != project.default_branch
end
def enabling_wiki?