gitlab-org--gitlab-foss/lib/gitlab/conflict
Sean McGivern 96c77bf775 Allow resolving conflicts with non-ASCII chars
We wanted to check that the text could be encoded as JSON, because
conflict resolutions are passed back and forth in that format, so the
file itself must be UTF-8. However, all strings from the repository come
back without an encoding from Rugged, making them ASCII_8BIT.

We force to UTF-8, and reject if it's invalid. This still leaves the
problem of a file that 'looks like' UTF-8 (contains valid UTF-8 byte
sequences), but isn't. However:

1. If the conflicts contain the problem bytes, the user will see that
   the file isn't displayed correctly.
2. If the problem bytes are outside of the conflict area, then we will
   write back the same bytes when we resolve the conflicts, even though
   we though the encoding was UTF-8.
2017-03-15 11:18:29 +00:00
..
file.rb Enable and autocorrect the CustomErrorClass cop 2017-03-01 15:28:10 +00:00
file_collection.rb Enable and autocorrect the CustomErrorClass cop 2017-03-01 15:28:10 +00:00
parser.rb Allow resolving conflicts with non-ASCII chars 2017-03-15 11:18:29 +00:00
resolution_error.rb Enable and autocorrect the CustomErrorClass cop 2017-03-01 15:28:10 +00:00