1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-09-21 09:28:50 +02:00
phorge-arcanist/src/parser/diff
epriestley 13ea6ea5b6 Add basic binary file support to 'arc patch'
Summary:
I'm probably missing some edge cases but it took me almost 3 hours to get this
far and I think it only makes things work that didn't work before. Some stuff
like SVN binary patches still won't work, although they should be far easier to
implement.

Most of the magic here just comes from reading the git source code. It appears
to work correctly; I sprinkled printf() around git liberally and recompiled it
during development. Took me about 45 minutes to figure out that "Index" vs
"index" causes git to silently fail in a confusing way. :/

Git has a diff mode for binary changes but I don't think we lose much by always
using the full binaries. We can enhance it later if we want.

Test Plan:
Exported and patched binary changes (a picture of a duck) into a working copy.

Reviewed By: aran
Reviewers: tuomaspelkonen, jungejason, aran
CC: simpkins, aran, epriestley
Differential Revision: 327
2011-05-22 06:58:16 -07:00
..
__tests__ Some documentation. 2011-02-19 11:36:08 -08:00
change Add basic binary file support to 'arc patch' 2011-05-22 06:58:16 -07:00
changetype Some documentation. 2011-02-19 11:36:08 -08:00
hunk Possible workaround for null 'changes'. 2011-02-28 11:33:22 -08:00
__init__.php Initial commit. 2011-01-09 15:22:25 -08:00
ArcanistDiffParser.php Expand ArcanistDiffParser to accept awkward Diffusion + SVN workflows. 2011-03-30 19:33:50 -07:00