I just updated to 0.1.4 and it looks like tree.diffWorkDir is gone. I've poked around trying to find out where it's gone to without any luck. Are we supposed to use straight libgit2 passthrough methods now? If so, how?
Can you do some research and see what method is missing? 0.1.4 didn't deprecate anything it only added prebuilt binaries. The current master is not at parity with the previous build though, so if we're missing a libgit2 method I'd like to fix it.
Sure. I'm trying to call git_diff_tree_to_workdir and/or git_diff_tree_to_workdir_with_index. I haven't been able to figure out how to call anything in libgit2 without a js helper since I'm still on 0.1.1 in production and quite a bit has changed since then.
Okay cool, I can make sure that's added. Although it shouldn't have been removed from 0.1.4, which is on NPM; can you confirm that? As for those methods, it should be easy to add them to generate/descriptor.json and then run npm run generate. Compare the descriptor/idefs.json to generate/nkallen.json and see if they match up. You may need to tweak descriptor.json to match.
Once you get it matching, you should be able to run npm run rebuild. This will rebuild the module and allow you to write a unit test showing diff.treeToWorkdir or diff.treeToWorkdirWithIndex work.
Thanks for the instructions, I'm finally getting around to this. I did verify the configs are missing from generate/descriptor.json and was able to add them in such that npm run generate output matches generate/nkallen.json.
The problem I'm having is that I can't get the existing unit tests to pass (even if I revert my changes and run straight against the latest master @ 32789a7#diff-d41d8cd98f00b204e9800998ecf8427e). The error when running npm test is:
> nodegit@0.1.4 test /Users/kciccarello/code/nodegit
> npm run lint && npm run mocha
> nodegit@0.1.4 lint /Users/kciccarello/code/nodegit
> jshint lib test/tests
lib/commit.js: line 2, col 5, Redefinition of 'Promise'.
1 error
npm ERR! nodegit@0.1.4 lint: `jshint lib test/tests`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the nodegit@0.1.4 lint script.
Yeah it does seem that "Promise" is going to be a reserved word now. So
either the script should not use that reserved word or we change the linter
to allow it.
Yeah looks like @rwaldron made it possible to at least tweak the JSHint settings to allow it. @kciccarello were you able to get tests to pass after running mocha directly? Also be aware that I changed some values in the tests that may not be right, so I'd double check that I didn't royally screw stuff up :-p
Makes sense. I was able to get the tests passing by running mocha directly, yes. Will submit a pr once I get can get this done and verify it works. Thanks
I just updated to 0.1.4 and it looks like tree.diffWorkDir is gone. I've poked around trying to find out where it's gone to without any luck. Are we supposed to use straight libgit2 passthrough methods now? If so, how?