968
}
969
}
970
971
-static const char *find_wholine(const char *who, int wholen, const char *buf, unsigned long sz)
971
+static const char *find_wholine(const char *who, int wholen, const char *buf)
972
{
973
const char *eol;
974
while (*buf) {
1064
}
1065
1066
/* See grab_values */
1067
-static void grab_person(const char *who, struct atom_value *val, int deref, void *buf, unsigned long sz)
1067
+static void grab_person(const char *who, struct atom_value *val, int deref, void *buf)
1068
{
1069
int i;
1070
int wholen = strlen(who);
1085
!starts_with(name + wholen, "date"))
1086
continue;
1087
if (!wholine)
1088
- wholine = find_wholine(who, wholen, buf, sz);
1088
+ wholine = find_wholine(who, wholen, buf);
1089
if (!wholine)
1090
return; /* no point looking for it */
1091
if (name[wholen] == 0)
1105
if (strcmp(who, "tagger") && strcmp(who, "committer"))
1106
return; /* "author" for commit object is not wanted */
1107
if (!wholine)
1108
- wholine = find_wholine(who, wholen, buf, sz);
1108
+ wholine = find_wholine(who, wholen, buf);
1109
if (!wholine)
1110
return;
1111
for (i = 0; i < used_atom_cnt; i++) {
1123
}
1124
}
1125
1126
-static void find_subpos(const char *buf, unsigned long sz,
1126
+static void find_subpos(const char *buf,
1127
const char **sub, unsigned long *sublen,
1128
const char **body, unsigned long *bodylen,
1129
unsigned long *nonsiglen,
1192
}
1193
1194
/* See grab_values */
1195
-static void grab_sub_body_contents(struct atom_value *val, int deref, void *buf, unsigned long sz)
1195
+static void grab_sub_body_contents(struct atom_value *val, int deref, void *buf)
1196
{
1197
int i;
1198
const char *subpos = NULL, *bodypos = NULL, *sigpos = NULL;
1212
!starts_with(name, "contents"))
1213
continue;
1214
if (!subpos)
1215
- find_subpos(buf, sz,
1215
+ find_subpos(buf,
1216
&subpos, &sublen,
1217
&bodypos, &bodylen, &nonsiglen,
1218
&sigpos, &siglen);
1265
* pointed at by the ref itself; otherwise it is the object the
1266
* ref (which is a tag) refers to.
1267
*/
1268
-static void grab_values(struct atom_value *val, int deref, struct object *obj, void *buf, unsigned long sz)
1268
+static void grab_values(struct atom_value *val, int deref, struct object *obj, void *buf)
1269
{
1270
switch (obj->type) {
1271
case OBJ_TAG:
1272
grab_tag_values(val, deref, obj);
1273
- grab_sub_body_contents(val, deref, buf, sz);
1274
- grab_person("tagger", val, deref, buf, sz);
1273
+ grab_sub_body_contents(val, deref, buf);
1274
+ grab_person("tagger", val, deref, buf);
1275
break;
1276
case OBJ_COMMIT:
1277
grab_commit_values(val, deref, obj);
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);
1278
+ grab_sub_body_contents(val, deref, buf);
1279
+ grab_person("author", val, deref, buf);
1280
+ grab_person("committer", val, deref, buf);
1281
break;
1282
case OBJ_TREE:
1283
/* grab_tree_values(val, deref, obj, buf, sz); */
1516
return strbuf_addf_ret(err, -1, _("parse_object_buffer failed on %s for %s"),
1517
oid_to_hex(&oi->oid), ref->refname);
1518
}
1519
- grab_values(ref->value, deref, *obj, oi->content, oi->size);
1519
+ grab_values(ref->value, deref, *obj, oi->content);
1520
}
1521
1522
grab_common_values(ref->value, deref, oi);