ref-filter: drop unused "obj" parameters

The grab_person() and grab_sub_body_contents() functions take both an object struct and a buf/sz pair of the object bytes. However, they use only the latter, since "struct object" does not contain the parsed ident (nor the whole commit message, of course). Let's get rid of these misleading "struct object" parameters. It's possible we may want them in the future (e.g., to generate error messages that mention the object id), but since these are static functions, we can easily add them back in later (and if we do want that information, it's likely we'd pass it through a more generalized "parsing context" struct anyway). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff King committed Feb 14, 2019 at 00:50 UTC 25051cac802b01a588f8170e96f97bf17869177a
1 file changed +7 -7
ref-filter.c
+7 -7
@@ -1064,7 +1064,7 @@ static void grab_date(const char *buf, struct atom_value *v, const char *atomnam
1064 }
1065
1066 /* See grab_values */
1067 -static void grab_person(const char *who, struct atom_value *val, int deref, struct object *obj, void *buf, unsigned long sz)
1067 +static void grab_person(const char *who, struct atom_value *val, int deref, void *buf, unsigned long sz)
1068 {
1069 int i;
1070 int wholen = strlen(who);
@@ -1192,7 +1192,7 @@ static void append_lines(struct strbuf *out, const char *buf, unsigned long size
1192 }
1193
1194 /* See grab_values */
1195 -static void grab_sub_body_contents(struct atom_value *val, int deref, struct object *obj, void *buf, unsigned long sz)
1195 +static void grab_sub_body_contents(struct atom_value *val, int deref, void *buf, unsigned long sz)
1196 {
1197 int i;
1198 const char *subpos = NULL, *bodypos = NULL, *sigpos = NULL;
@@ -1270,14 +1270,14 @@ static void grab_values(struct atom_value *val, int deref, struct object *obj, v
1270 switch (obj->type) {
1271 case OBJ_TAG:
1272 grab_tag_values(val, deref, obj);
1273 - grab_sub_body_contents(val, deref, obj, buf, sz);
1274 - grab_person("tagger", val, deref, obj, buf, sz);
1273 + grab_sub_body_contents(val, deref, buf, sz);
1274 + grab_person("tagger", val, deref, buf, sz);
1275 break;
1276 case OBJ_COMMIT:
1277 grab_commit_values(val, deref, obj);
1278 - grab_sub_body_contents(val, deref, obj, buf, sz);
1279 - grab_person("author", val, deref, obj, buf, sz);
1280 - grab_person("committer", val, deref, obj, buf, sz);
1278 + grab_sub_body_contents(val, deref, buf, sz);
1279 + grab_person("author", val, deref, buf, sz);
1280 + grab_person("committer", val, deref, buf, sz);
1281 break;
1282 case OBJ_TREE:
1283 /* grab_tree_values(val, deref, obj, buf, sz); */