FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

tree.diffWorkDir deprecated? · Issue #209 · nodegit/nodegit · GitHub

Repository navigation

tree.diffWorkDir deprecated? #209

Description

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?

Activity

  1. tbranyen commented on Jul 24, 2014

    Member

    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.

  2. kmctown commented on Jul 24, 2014

    CollaboratorAuthor

    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.

  3. tbranyen commented on Jul 24, 2014

    Member

    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.

  4. kmctown commented on Aug 21, 2014

    CollaboratorAuthor

    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.
    

    Any ideas?

  5. kmctown commented on Aug 21, 2014

    CollaboratorAuthor

    Nevermind, I see there's an issue with the linter. Skipping that and running npm run mocha for my purposes.

  6. johnhaley81 commented on Aug 21, 2014

    Collaborator

    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.

    jshint/jshint/issues/1747

    On Thu, Aug 21, 2014 at 12:08 PM, Kris Ciccarello notifications@github.com
    wrote:

    Nevermind, I see there's an issue with the linter. Skipping that and
    running npm run mocha for my purposes.

    —
    Reply to this email directly or view it on GitHub
    #209 (comment).

  7. tbranyen commented on Aug 22, 2014

    Member

    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

  8. kmctown commented on Aug 22, 2014

    CollaboratorAuthor

    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

  9. tbranyen commented on Aug 22, 2014

    Member

    Awesome thanks @kciccarello!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL