promisor-remote: output trace2 statistics for number of objects fetched
Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
670b81a890
commit
78cfdd0cf5
@ -12,7 +12,8 @@ void set_repository_format_partial_clone(char *partial_clone)
|
||||
repository_format_partial_clone = xstrdup_or_null(partial_clone);
|
||||
}
|
||||
|
||||
static int fetch_objects(const char *remote_name,
|
||||
static int fetch_objects(struct repository *repo,
|
||||
const char *remote_name,
|
||||
const struct object_id *oids,
|
||||
int oid_nr)
|
||||
{
|
||||
@ -30,6 +31,8 @@ static int fetch_objects(const char *remote_name,
|
||||
die(_("promisor-remote: unable to fork off fetch subprocess"));
|
||||
child_in = xfdopen(child.in, "w");
|
||||
|
||||
trace2_data_intmax("promisor", repo, "fetch_count", oid_nr);
|
||||
|
||||
for (i = 0; i < oid_nr; i++) {
|
||||
if (fputs(oid_to_hex(&oids[i]), child_in) < 0)
|
||||
die_errno(_("promisor-remote: could not write to fetch subprocess"));
|
||||
@ -238,7 +241,7 @@ int promisor_remote_get_direct(struct repository *repo,
|
||||
promisor_remote_init();
|
||||
|
||||
for (r = promisors; r; r = r->next) {
|
||||
if (fetch_objects(r->name, remaining_oids, remaining_nr) < 0) {
|
||||
if (fetch_objects(repo, r->name, remaining_oids, remaining_nr) < 0) {
|
||||
if (remaining_nr == 1)
|
||||
continue;
|
||||
remaining_nr = remove_fetched_oids(repo, &remaining_oids,
|
||||
|
Loading…
Reference in New Issue
Block a user