1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-03 05:16:33 +02:00

ref-filter: drop unused buf/sz pairs

The grab_tag_values() and grab_commit_values() functions take both the
"struct object" as well as the buf/sz pair for the actual object bytes.
However, neither function uses the latter, as they pull the data
directly from the parsed object struct.

Let's get rid of these misleading parameters.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King 2019-02-14 00:50:54 -05:00 committed by Junio C Hamano
parent 10dee40ed3
commit e0329199a7

View File

@ -913,7 +913,7 @@ static void grab_common_values(struct atom_value *val, int deref, struct expand_
}
/* See grab_values */
static void grab_tag_values(struct atom_value *val, int deref, struct object *obj, void *buf, unsigned long sz)
static void grab_tag_values(struct atom_value *val, int deref, struct object *obj)
{
int i;
struct tag *tag = (struct tag *) obj;
@ -935,7 +935,7 @@ static void grab_tag_values(struct atom_value *val, int deref, struct object *ob
}
/* See grab_values */
static void grab_commit_values(struct atom_value *val, int deref, struct object *obj, void *buf, unsigned long sz)
static void grab_commit_values(struct atom_value *val, int deref, struct object *obj)
{
int i;
struct commit *commit = (struct commit *) obj;
@ -1269,12 +1269,12 @@ static void grab_values(struct atom_value *val, int deref, struct object *obj, v
{
switch (obj->type) {
case OBJ_TAG:
grab_tag_values(val, deref, obj, buf, sz);
grab_tag_values(val, deref, obj);
grab_sub_body_contents(val, deref, obj, buf, sz);
grab_person("tagger", val, deref, obj, buf, sz);
break;
case OBJ_COMMIT:
grab_commit_values(val, deref, obj, buf, sz);
grab_commit_values(val, deref, obj);
grab_sub_body_contents(val, deref, obj, buf, sz);
grab_person("author", val, deref, obj, buf, sz);
grab_person("committer", val, deref, obj, buf, sz);