Created
April 23, 2011 16:08
-
-
Save payload/938740 to your computer and use it in GitHub Desktop.
repo.branch fails on empty repo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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