Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-05-08 22:37:33 +0300
committerJunio C Hamano <gitster@pobox.com>2018-05-09 06:12:36 +0300
commitdd5d9deb0155a27cb2d74d1a0faf0af84ef5f355 (patch)
tree9be9ce4fda0e7b0d5ea7b1f9655897f24513f929 /object.c
parent17bfe87369a726ebf3b1156ffd38c014bbd67e88 (diff)
alloc: add repository argument to alloc_commit_index
This is a small mechanical change; it doesn't change the implementation to handle repositories other than the_repository yet. Use a macro to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'object.c')
-rw-r--r--object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/object.c b/object.c
index b8c3f923c5..a365a91085 100644
--- a/object.c
+++ b/object.c
@@ -162,7 +162,7 @@ void *object_as_type(struct object *obj, enum object_type type, int quiet)
return obj;
else if (obj->type == OBJ_NONE) {
if (type == OBJ_COMMIT)
- ((struct commit *)obj)->index = alloc_commit_index();
+ ((struct commit *)obj)->index = alloc_commit_index(the_repository);
obj->type = type;
return obj;
}