summaryrefslogtreecommitdiff
path: root/src/odb.c
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2011-01-13 04:54:14 +0200
committerVicent Marti <tanoku@gmail.com>2011-01-13 04:54:14 +0200
commitec3c7a16c260fa6540cfe8daf37c1324100f51bf (patch)
treec95f8c1b0ab40fee42efbfd2e441901de0b95eb2 /src/odb.c
parentc5846fbf24f5c88704b2faa2a0905515936c874b (diff)
downloadlibgit2-ec3c7a16c260fa6540cfe8daf37c1324100f51bf.tar.gz
Add new Repository initialization method
Lets the user specify the ODB that will be used by the repository manually. Signed-off-by: Vicent Marti <tanoku@gmail.com>
Diffstat (limited to 'src/odb.c')
-rw-r--r--src/odb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/odb.c b/src/odb.c
index d54ad83fe..26b457b7c 100644
--- a/src/odb.c
+++ b/src/odb.c
@@ -277,8 +277,8 @@ int git_odb_read(git_rawobj *out, git_odb *db, const git_oid *id)
for (i = 0; i < db->backends.length && error < 0; ++i) {
git_odb_backend *b = git_vector_get(&db->backends, i);
- assert(b->read != NULL);
- error = b->read(out, b, id);
+ if (b->read != NULL)
+ error = b->read(out, b, id);
}
return error;