ryanackley/git-html5.js — pull request #6 by maks (2014-02-19 23:50:22+00:00)
Title: Add diff command

Apologies for the rather monster PR, but I haven't had the time to extract the related "getting things to work" fixes, out from the main subject of the PR, refactoring the existing diffTree into seperate command js file and then building recursiveTreeDiff() on top of it. Additionally I also did a renderDiff() to give a unifedDiff text version from the output of recursiveTreeDiff, this uses the added JSDiff thirdparty lib.

I'll make sure subsequent PRs are properly focused on just one topic.

The other changes in this PR are fixes for fixing the order of mkdirs and checkDIrectory as otherwise clone using the files directly, instead of the built api js file didn't work. Thats also why I deleted the prebuilt file since it needs to be re-built after these changes but I didn't want to do that if/until after this PR is merged.

I also made crc32 a proper AMD module as that was trivial change, I'll try to do a followup PR to do the same for the JSDiff dependency I've added here.

And sorry about the mucky doc comments, I'll get them fixed as soon as I can.

Finally I added a bit more error handling for fs ops that go wrong.