strbuf_release(&path);
}
-static int finish_pack_objects_cmd(struct child_process *cmd,
+static int finish_pack_objects_cmd(const struct git_hash_algo *algop,
+ struct child_process *cmd,
struct string_list *names,
int local)
{
while (strbuf_getline_lf(&line, out) != EOF) {
struct string_list_item *item;
- if (line.len != the_hash_algo->hexsz)
+ if (line.len != algop->hexsz)
die(_("repack: Expecting full hex object ID lines only "
"from pack-objects."));
/*
fprintf(in, "%s%s.pack\n", caret, item->string);
fclose(in);
- return finish_pack_objects_cmd(&cmd, names, local);
+ return finish_pack_objects_cmd(existing->repo->hash_algo, &cmd, names,
+ local);
}
static void combine_small_cruft_packs(FILE *in, size_t combine_cruft_below_size,
fprintf(in, "%s.pack\n", item->string);
fclose(in);
- return finish_pack_objects_cmd(&cmd, names, local);
+ return finish_pack_objects_cmd(existing->repo->hash_algo, &cmd, names,
+ local);
}
static const char *find_pack_prefix(const char *packdir, const char *packtmp)
fclose(in);
}
- ret = finish_pack_objects_cmd(&cmd, &names, 1);
+ ret = finish_pack_objects_cmd(repo->hash_algo, &cmd, &names, 1);
if (ret)
goto cleanup;