diff options
Diffstat (limited to 'refs/packed-backend.c')
-rw-r--r-- | refs/packed-backend.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/refs/packed-backend.c b/refs/packed-backend.c index 4458a0f69c..dfecdbc1db 100644 --- a/refs/packed-backend.c +++ b/refs/packed-backend.c @@ -200,6 +200,7 @@ struct ref_store *packed_ref_store_create(const char *path, struct ref_store *ref_store = (struct ref_store *)refs; base_ref_store_init(ref_store, &refs_be_packed); + ref_store->gitdir = xstrdup(path); refs->store_flags = store_flags; refs->path = xstrdup(path); @@ -940,7 +941,7 @@ static struct ref_iterator *packed_ref_iterator_begin( if (start == snapshot->eof) return empty_ref_iterator_begin(); - iter = xcalloc(1, sizeof(*iter)); + CALLOC_ARRAY(iter, 1); ref_iterator = &iter->base; base_ref_iterator_init(ref_iterator, &packed_ref_iterator_vtable, 1); @@ -1423,7 +1424,7 @@ static int packed_transaction_prepare(struct ref_store *ref_store, * do so itself. */ - data = xcalloc(1, sizeof(*data)); + CALLOC_ARRAY(data, 1); string_list_init(&data->updates, 0); transaction->backend_data = data; |