summaryrefslogtreecommitdiff
path: root/app/services/files/base_service.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/files/base_service.rb')
-rw-r--r--app/services/files/base_service.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/services/files/base_service.rb b/app/services/files/base_service.rb
index 29013be0f97..4d02752454e 100644
--- a/app/services/files/base_service.rb
+++ b/app/services/files/base_service.rb
@@ -17,7 +17,8 @@ module Files
def after_commit(sha)
commit = repository.commit(sha)
full_ref = 'refs/heads/' + (params[:new_branch] || ref)
- GitPushService.new.execute(project, current_user, commit.parent_id, sha, full_ref)
+ old_sha = commit.parent_id || Gitlab::Git::BLANK_SHA
+ GitPushService.new.execute(project, current_user, old_sha, sha, full_ref)
end
end
end