Add revwalk support

This commit is contained in:
Carlos Martín Nieto
2013-04-02 17:12:43 +02:00
parent 011068f51c
commit 58aff1e129
8 changed files with 229 additions and 0 deletions

View File

@@ -63,6 +63,9 @@ geef_object_lookup(ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[])
git_oid_fromraw(&id, bin.data);
obj = enif_alloc_resource(geef_object_type, sizeof(geef_object));
if (!obj)
return atoms.error;
if (git_object_lookup(&obj->obj, repo->repo, &id, GIT_OBJ_ANY) < 0) {
enif_release_resource(obj);
return geef_error(env);