next = ref->next;
if (starts_with(ref->name, "refs/") &&
- check_refname_format(ref->name, 0))
- ; /* trash */
- else {
+ check_refname_format(ref->name, 0)) {
+ /*
+ * trash or a peeled value; do not even add it to
+ * unmatched list
+ */
+ free_one_ref(ref);
+ continue;
+ } else {
while (i < nr_sought) {
int cmp = strcmp(ref->name, sought[i]->name);
if (cmp < 0)
}
oidset_clear(&tip_oids);
- for (ref = unmatched; ref; ref = next) {
- next = ref->next;
- free(ref);
- }
+ free_refs(unmatched);
*refs = newlist;
}
server_supports_v2("server-option", 1)) {
int i;
for (i = 0; i < args->server_options->nr; i++)
- packet_write_fmt(fd_out, "server-option=%s",
+ packet_buf_write(&req_buf, "server-option=%s",
args->server_options->items[i].string);
}