Page MenuHomePhabricator

Consolidate binary file handling in `arc diff`
Open, NormalPublic

Description

Although arc diff does a reasonable job with binary files in totality, we should consolidate how they're handled and make handling more explicit, consistent, and interactive. In particular:

  • D6893 touches some weird heursitics deep in the SVN repository API. We should lift these to top level and make them explicit ("These files aren't marked as binaries, but probably should be. Do you want to mark them? a.jpg, b.jpg"). We already have code to do this based on file content, so it's possible we can remove the D6893 block entirely (it may not be reachable for files which aren't already marked properly).
  • Apparently, some default configurations of svn automatically set the property application/x-shellscript (which SVN considers binary) on shell files. We then oblige SVN and treat these files as binary, but this isn't what the user wants, normally. This would imply the opposite prompt: "These files are marked as binaries, but probably should not be. Do you want to unmark them? a.sh, b.sh". This might also need a --trust-me-i-am-good-at-mime-types flag and/or config option.
  • General handling/categorization of binaries follows consistent rules, I think, but could be more explicit and better documented.