summaryrefslogtreecommitdiff
path: root/src/odb_pack.c
diff options
context:
space:
mode:
authorBen Straub <bs@github.com>2012-11-29 19:59:18 -0800
committerBen Straub <bs@github.com>2012-11-30 13:12:15 -0800
commit55f6f21b7dd5a177e2cc60c1054b438c05ed8f14 (patch)
tree4035aacea39de443dbe855b98636d459d53670a8 /src/odb_pack.c
parentca901e7b0fb38a7f4748ff5fcde7a2779f3a7771 (diff)
downloadlibgit2-55f6f21b7dd5a177e2cc60c1054b438c05ed8f14.tar.gz
Deploy versioned git_odb_backend structure
Diffstat (limited to 'src/odb_pack.c')
-rw-r--r--src/odb_pack.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/odb_pack.c b/src/odb_pack.c
index 35bf1580d..41789e4ec 100644
--- a/src/odb_pack.c
+++ b/src/odb_pack.c
@@ -570,6 +570,7 @@ int git_odb_backend_one_pack(git_odb_backend **backend_out, const char *idx)
backend = git__calloc(1, sizeof(struct pack_backend));
GITERR_CHECK_ALLOC(backend);
+ backend->parent.version = GIT_ODB_BACKEND_VERSION;
if (git_vector_init(&backend->packs, 1, NULL) < 0)
goto on_error;
@@ -602,6 +603,7 @@ int git_odb_backend_pack(git_odb_backend **backend_out, const char *objects_dir)
backend = git__calloc(1, sizeof(struct pack_backend));
GITERR_CHECK_ALLOC(backend);
+ backend->parent.version = GIT_ODB_BACKEND_VERSION;
if (git_vector_init(&backend->packs, 8, packfile_sort__cb) < 0 ||
git_buf_joinpath(&path, objects_dir, "pack") < 0)