Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diffs do not support non-UTF8 content #195

Open
jspahrsummers opened this issue Jun 30, 2013 · 3 comments
Open

Diffs do not support non-UTF8 content #195

jspahrsummers opened this issue Jun 30, 2013 · 3 comments
Labels

Comments

@jspahrsummers
Copy link
Contributor

For example, fetching the diff for graphics.ai in mhettler/accuratelockandhardware.com@4e77bd2 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.

@alanjrogers
Copy link
Contributor

Those are Adobe illustrator files, so they really should be treated as binary.

@jspahrsummers
Copy link
Contributor Author

@alanjrogers Core git doesn't treat them that way either, for whatever reason, though that doesn't mean we can't.

@arrbee
Copy link
Member

arrbee commented Jul 1, 2013

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants