]> khamidou — GitHub mirrors - arcanist.git/commit
Allow 'arc diff' to detect non-UTF8 files and mark them binary
authorepriestley <git@epriestley.com>
Sat, 21 May 2011 14:16:12 +0000 (07:16 -0700)
committerepriestley <git@epriestley.com>
Tue, 31 May 2011 19:13:24 +0000 (12:13 -0700)
commitd3816f1c9e5c3f9786cc3a8a55f624ba80c71b17
treebbb1304e7cfc5d0c652cd073150eeef9d4671cdd
parent5b6fbf70e05902204ec66f37c01a4ad65fe81a38
Allow 'arc diff' to detect non-UTF8 files and mark them binary

Summary:
There are a bunch of different ways we could approach this, but practically I
think this is probably the best one even though it's kind of yucky.

A big part of my motivation here is that if we just reject UTF-8 outright, users
are going to end up in a situation they don't understand how to resolve.

UPDATE: after discussion, going with a more conservative approach until such
time as we have a more compelling case for the less strict functionality.

Test Plan:
Created a diff with a text file that contained invalid UTF-8 subsequences.

Reviewed By: tuomaspelkonen
Reviewers: tuomaspelkonen, jungejason, aran
Commenters: aran
CC: aran, epriestley, tuomaspelkonen
Differential Revision: 325
src/workflow/diff/ArcanistDiffWorkflow.php