Skip to content

Instantly share code, notes, and snippets.

@payload
Created April 23, 2011 16:08
Show Gist options
  • Save payload/938740 to your computer and use it in GitHub Desktop.
Save payload/938740 to your computer and use it in GitHub Desktop.
repo.branch fails on empty repo
var git = require('nodegit');
git.repo().init("foo", true, function() {
git.repo("foo", function(err, repo) {
repo.branch("master", function(err, branch) {
console.log({
err: err,
branch: branch
});
console.log("doing something else");
});
});
});
/*
{ err: { error: {} },
branch:
{ repo: {},
ref: {},
lookup: [Function],
oid: [Function] } }
doing something else
node: ../../src/refs.c:1067: git_reference_oid: Assertion `ref' failed.
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment