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:
authorJonathan Nieder <jrnieder@gmail.com>2018-05-08 22:37:26 +0300
committerJunio C Hamano <gitster@pobox.com>2018-05-09 06:12:36 +0300
commitc077a4526ba456ada28d16db9c945afd9a4a57de (patch)
treea80571e6fde265d8f6b3a898c018665b87cfabba /object.c
parent68f95d382b51b134b138c91f94adb8d9ef2f557a (diff)
object: add repository argument to grow_object_hash
Add a repository argument to allow the caller of grow_object_hash to be more specific about which repository to handle. This is a small mechanical change; it doesn't change the implementation to handle repositories other than the_repository yet. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> 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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/object.c b/object.c
index 2de029275b..91edc30770 100644
--- a/object.c
+++ b/object.c
@@ -116,7 +116,8 @@ struct object *lookup_object(const unsigned char *sha1)
* power of 2 (but at least 32). Copy the existing values to the new
* hash map.
*/
-static void grow_object_hash(void)
+#define grow_object_hash(r) grow_object_hash_##r()
+static void grow_object_hash_the_repository(void)
{
int i;
/*
@@ -147,7 +148,7 @@ void *create_object_the_repository(const unsigned char *sha1, void *o)
hashcpy(obj->oid.hash, sha1);
if (the_repository->parsed_objects->obj_hash_size - 1 <= the_repository->parsed_objects->nr_objs * 2)
- grow_object_hash();
+ grow_object_hash(the_repository);
insert_obj_hash(obj, the_repository->parsed_objects->obj_hash,
the_repository->parsed_objects->obj_hash_size);