Skip to content
This repository was archived by the owner on Dec 2, 2026. It is now read-only.
This repository was archived by the owner on Dec 2, 2026. It is now read-only.

Strange C++ Error probably on Reset #1596

Closed

Description

@GCSBOSS

System information

  • node version: v10.8.0.
  • npm or yarn version: 6.3.0
  • OS/version/architecture: Windows 10 x64 (10.0.17134)
  • Applicable nodegit version: 0.23.0

image

npm ERR! Exit status 3221225477

Relevant code:

let current = await repo.getHeadCommit();
await repo.fetchAll();
let newest = repo.getReferenceCommit('origin/master');
if(current.id == newest.id)
    return;
await Reset(repo, newest, Reset.TYPE.HARD);

Activity

  1. GCSBOSS commented on Dec 9, 2018

    @GCSBOSS
    Author

    This fixed the code, though that error should probably be handled more gracefully.

    let current = await repo.getHeadCommit();
    await repo.fetchAll();
    let newest = await repo.getReferenceCommit('origin/master');
    if(current.sha() == newest.sha())
        return;
    await Reset(repo, newest, Reset.TYPE.HARD);
  2. implausible commented on Dec 13, 2018

    @implausible
    Member

    It's possible we could improve the errors; however, in general passing a promise into a method that doesn't expect it is going to lead to a crash.

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