Commit 9f75b7a4 authored by Sean McGivern's avatar Sean McGivern

Merge branch 'gitaly-conflict-file' into 'master'

Small Gitlab::Git fixes for Gitaly

See merge request gitlab-org/gitlab-ce!15675
parents c925820a 359b65be
...@@ -2,7 +2,7 @@ module Gitlab ...@@ -2,7 +2,7 @@ module Gitlab
module Git module Git
module Conflict module Conflict
class File class File
attr_reader :content, :their_path, :our_path, :our_mode, :repository attr_reader :content, :their_path, :our_path, :our_mode, :repository, :commit_oid
def initialize(repository, commit_oid, conflict, content) def initialize(repository, commit_oid, conflict, content)
@repository = repository @repository = repository
......
...@@ -75,7 +75,7 @@ module Gitlab ...@@ -75,7 +75,7 @@ module Gitlab
resolved_lines = file.resolve_lines(params[:sections]) resolved_lines = file.resolve_lines(params[:sections])
new_file = resolved_lines.map { |line| line[:full_line] }.join("\n") new_file = resolved_lines.map { |line| line[:full_line] }.join("\n")
new_file << "\n" if file.our_blob.data.ends_with?("\n") new_file << "\n" if file.our_blob.data.end_with?("\n")
elsif params[:content] elsif params[:content]
new_file = file.resolve_content(params[:content]) new_file = file.resolve_content(params[:content])
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment