{"thread":{"id":"43367","subject":"[PATCH] index-pack: minor fixes to comment and function name","startedAt":"2006-10-27T20:14:23Z","lastAt":"2006-10-27T20:14:23Z","messageCount":1,"participants":["Nicolas Pitre"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"294514","messageId":"Pine.LNX.4.64.0610271609310.11384@xanadu.home","threadId":"43367","inReplyTo":null,"subject":"[PATCH] index-pack: minor fixes to comment and function name","fromName":"Nicolas Pitre","fromEmail":"nico@cam.org","sentAt":"2006-10-27T20:14:23Z","receivedAt":"2006-10-27T20:14:23Z","isPatch":true,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"Use proper english. Be more exact in one comment.\n\nSigned-off-by: Nicolas Pitre <nico@cam.org>\n\n---\n\ndiff --git a/index-pack.c b/index-pack.c\nindex 5c747a6..3a389c1 100644\n--- a/index-pack.c\n+++ b/index-pack.c\n@@ -324,8 +324,8 @@ static int find_delta(const union delta_\n         return -first-1;\n }\n \n-static int find_delta_childs(const union delta_base *base,\n-\t\t\t     int *first_index, int *last_index)\n+static int find_delta_children(const union delta_base *base,\n+\t\t\t       int *first_index, int *last_index)\n {\n \tint first = find_delta(base);\n \tint last = first;\n@@ -389,7 +389,7 @@ static void resolve_delta(struct object_\n \tnr_resolved_deltas++;\n \n \thashcpy(delta_base.sha1, delta_obj->sha1);\n-\tif (!find_delta_childs(&delta_base, &first, &last)) {\n+\tif (!find_delta_children(&delta_base, &first, &last)) {\n \t\tfor (j = first; j <= last; j++) {\n \t\t\tstruct object_entry *child = objects + deltas[j].obj_no;\n \t\t\tif (child->real_type == OBJ_REF_DELTA)\n@@ -399,7 +399,7 @@ static void resolve_delta(struct object_\n \n \tmemset(&delta_base, 0, sizeof(delta_base));\n \tdelta_base.offset = delta_obj->offset;\n-\tif (!find_delta_childs(&delta_base, &first, &last)) {\n+\tif (!find_delta_children(&delta_base, &first, &last)) {\n \t\tfor (j = first; j <= last; j++) {\n \t\t\tstruct object_entry *child = objects + deltas[j].obj_no;\n \t\t\tif (child->real_type == OBJ_OFS_DELTA)\n@@ -429,7 +429,7 @@ static void parse_pack_objects(unsigned\n \t * First pass:\n \t * - find locations of all objects;\n \t * - calculate SHA1 of all non-delta objects;\n-\t * - remember base SHA1 for all deltas.\n+\t * - remember base (SHA1 or offset) for all deltas.\n \t */\n \tif (verbose)\n \t\tfprintf(stderr, \"Indexing %d objects.\\n\", nr_objects);\n@@ -489,10 +489,10 @@ static void parse_pack_objects(unsigned\n \t\tif (obj->type == OBJ_REF_DELTA || obj->type == OBJ_OFS_DELTA)\n \t\t\tcontinue;\n \t\thashcpy(base.sha1, obj->sha1);\n-\t\tref = !find_delta_childs(&base, &ref_first, &ref_last);\n+\t\tref = !find_delta_children(&base, &ref_first, &ref_last);\n \t\tmemset(&base, 0, sizeof(base));\n \t\tbase.offset = obj->offset;\n-\t\tofs = !find_delta_childs(&base, &ofs_first, &ofs_last);\n+\t\tofs = !find_delta_children(&base, &ofs_first, &ofs_last);\n \t\tif (!ref && !ofs)\n \t\t\tcontinue;\n \t\tdata = get_data_from_pack(obj);\n@@ -615,7 +615,7 @@ static void fix_unresolved_deltas(int nr\n \t\telse die(\"base object %s is of type '%s'\",\n \t\t\t sha1_to_hex(d->base.sha1), type);\n \n-\t\tfind_delta_childs(&d->base, &first, &last);\n+\t\tfind_delta_children(&d->base, &first, &last);\n \t\tfor (j = first; j <= last; j++) {\n \t\t\tstruct object_entry *child = objects + deltas[j].obj_no;\n"}]}