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

index.removeByPath stops execution · Issue #97 · nodegit/nodegit · GitHub

Repository navigation

index.removeByPath stops execution #97

Description

trying to use removeByPath by using repo.openIndex, index.read, index.removeByPath and the scripts stops execution, no error, no logs, return code is 0.

nodegit@0.1.0
node v0.10.13
OS: OSX 10.8.5

var git = require('nodegit')

git.Repo.open(repoPath, function(openError, repo) {
    if (openError) throw openError;
        repo.openIndex(function(openIndexError, index) {
        if (openIndexError) throw openIndexError;
        index.read(function(readError) {
            if (readError) throw readError;
            index.removeByPath(fileName, function(removeByPathError,r) {
                if (removeByPathError) throw removeByPathError; 
                console.log('ok');
            });
        });
    });
});

Steps to repro:

  • set repoPath to the path of a checked out repo
  • set fileName to the filename to delete from the repo

Expectations: prints 'ok' or throws removeByPathError
Actual: process stops without error.

Activity

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