]> khamidou — GitHub mirrors - arcanist.git/commit
Be slightly less dumb about detecting "binary" files
authorepriestley <git@epriestley.com>
Wed, 10 Aug 2011 18:57:07 +0000 (11:57 -0700)
committerepriestley <git@epriestley.com>
Wed, 10 Aug 2011 20:49:06 +0000 (13:49 -0700)
commit7a72b0b4f9b96b005b4a87cec870d33af3b18f09
tree93f9602b7294715f17847e02e7e84b99c40932c3
parentc5198d8bfeb51b71b669157e3b6bd1cd4670373e
Be slightly less dumb about detecting "binary" files

Summary:
A better definition of "binary" is "not utf-8", instead of "has some characters
not in this arbitrary regexp". Principally, this makes files with windows
newlines not autodetect as binary.

This might fix some of the issues in T365.

Test Plan: @egillth applied this patch and verified that Diffusion now shows
file content instead of detecting everything as binary in his repo full of
Windows newlines.
Reviewed By: jungejason
Reviewers: egillth, tuomaspelkonen, jungejason, aran
CC: aran, jungejason
Differential Revision: 799
src/parser/diff/ArcanistDiffParser.php