Open jspahrsummers opened 11 years ago
Those are Adobe illustrator files, so they really should be treated as binary.
@alanjrogers Core git doesn't treat them that way either, for whatever reason, though that doesn't mean we can't.
Core git has a --binary
flag that you can pass to diff to get binary diffs instead of line-oriented text diffs. I'm not actually sure what it does differently in that case - let me check it out.
For example, fetching the diff for
graphics.ai
in mhettler/accuratelockandhardware.com@4e77bd2ff0775d592175afe73586d0751891be00 will result in many nil hunk headers and lines.libgit2 is giving us valid C strings — at least in the sense that they represent the file's content, but may be in an unknown encoding. We should use Cocoa's text encoding functions or implement some fallbacks to handle more possible cases.