Skip to content

repo.branch fails on empty repo #22

@payload

Description

@payload

Calling repo.branch on an empty repo created with repo.init the program aborts with following message:

node: ../../src/refs.c:1067: git_reference_oid: Assertion `ref' failed.
Aborted

I tracked the bug down to repo.js line 37 ref.oid().oid.

If the repo "contains" at least one commit, the error doesnt get thrown.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions