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

Repository.open returns empty object · Issue #412 · nodegit/nodegit · GitHub

Repository navigation

Repository.open returns empty object #412

Description

Try to use your status example and it doesn't work
https://github.com/nodegit/nodegit/blob/master/examples/status.js#L6-L8
Logging repo shows empty object.

Activity

  1. tbranyen commented on Feb 18, 2015

    Member

    Logging out NodeGit objects will make them appear empty. This isn't a fault with NodeGit or your program, it's just how things get logged. If you were to log repo.__proto__ you'd see the prototype object looked up.

  2. max-mykhailenko commented on Feb 18, 2015

    Author

    Any log after https://github.com/nodegit/nodegit/blob/master/examples/status.js#L8 (in git status callback) doesn't run.

  3. tbranyen commented on Feb 18, 2015

    Member

    Probably due to an error, if you want to see if an error is logged, change that line to:

        repo.getStatus().catch(console.log.bind(console)).then(function(statuses) {
  4. max-mykhailenko commented on Feb 18, 2015

    Author

    Console is empty anyway

  5. max-mykhailenko commented on Feb 19, 2015

    Author

    Find error in catch of getStatus

    arguments 2 => { '0': [TypeError: Object #<Repository> has no method 'getStatus'] }
    

    Code

    nodegit.Repository.open(path.resolve(__dirname, '../.git'))
    .catch(function(){
      console.log('arguments =>', arguments);
    })
    .then(function(repoResult) {
      repo = repoResult;
      console.log('repo =>', repo.getStatus);
      return repo.getStatus();
    })
    .catch(function(){
      console.log('arguments 2 =>', arguments);
    })
    ...
    
  6. johnhaley81 commented on Feb 19, 2015

    Collaborator

    Is this on master or 0.2.7?

  7. max-mykhailenko commented on Feb 19, 2015

    Author

    After npm install nodegit --save-dev I got "nodegit": "^0.2.7" in my package.json

  8. johnhaley81 commented on Feb 19, 2015

    Collaborator

    repo.getStatus is only on master.

  9. maxkorp commented on Feb 19, 2015

    Collaborator

    Yeah, a LOT of the functionality has been implemented on master, ahead of 0.2.7. We're pushing forward with an 0.3 release as quickly as possible, to get that stuff out in the wild where its safe to use.

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