Method: Git::Lib#conflicts

Defined in:
lib/git/lib.rb

#conflicts

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

:yields: file, your, their



1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
# File 'lib/git/lib.rb', line 1364

def conflicts # :yields: file, your, their
  unmerged.each do |file_path|
    Tempfile.create(['YOUR-', File.basename(file_path)]) do |your_file|
      write_staged_content(file_path, 2, your_file).flush

      Tempfile.create(['THEIR-', File.basename(file_path)]) do |their_file|
        write_staged_content(file_path, 3, their_file).flush
        yield(file_path, your_file.path, their_file.path)
      end
    end
  end
end