summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/controllers/concerns/creates_commit.rb4
-rw-r--r--app/models/repository.rb2
-rw-r--r--app/services/git_operation_service.rb4
3 files changed, 5 insertions, 5 deletions
diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb
index 58de0917049..9d41c559b0b 100644
--- a/app/controllers/concerns/creates_commit.rb
+++ b/app/controllers/concerns/creates_commit.rb
@@ -4,8 +4,8 @@ module CreatesCommit
def create_commit(service, success_path:, failure_path:, failure_view: nil, success_notice: nil)
set_commit_variables
- source_branch = @ref if @ref &&
- @mr_source_project.repository.branch_exists?(@ref)
+ source_branch = @ref if
+ @ref && @mr_source_project.repository.branch_exists?(@ref)
commit_params = @commit_params.merge(
source_project: @mr_source_project,
source_branch: source_branch,
diff --git a/app/models/repository.rb b/app/models/repository.rb
index b01437acd8e..46995bdcb33 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -781,7 +781,7 @@ class Repository
end
if source_branch_name &&
- source_project.repository.tree_entry_at(source_branch_name, path)
+ source_project.repository.tree_entry_at(source_branch_name, path)
raise Gitlab::Git::Repository::InvalidBlobName.new(error_message)
end
end
diff --git a/app/services/git_operation_service.rb b/app/services/git_operation_service.rb
index f36c0b082e4..00c85112873 100644
--- a/app/services/git_operation_service.rb
+++ b/app/services/git_operation_service.rb
@@ -90,8 +90,8 @@ class GitOperationService
# If repo was empty expire cache
repository.after_create if was_empty
- repository.after_create_branch if was_empty ||
- Gitlab::Git.blank_ref?(oldrev)
+ repository.after_create_branch if
+ was_empty || Gitlab::Git.blank_ref?(oldrev)
newrev
end