Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

index.removeByPath stops execution #97

Copy link
Copy link
@dcolens

Description

@dcolens
Issue body actions

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.

Reactions are currently unavailable

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.