Patrick Steinhardt [off-list ref] writes:
[snip]
quoted hunk ↗ jump to hunk
@@ -468,9 +470,11 @@ static int refs_from_alternate_cb(struct odb_source *alternate,
void odb_for_each_alternate_ref(struct object_database *odb,
odb_for_each_alternate_ref_fn cb, void *payload)
{
- struct alternate_refs_data data;
- data.fn = cb;
- data.payload = payload;
+ struct alternate_refs_data data = {
+ .fn = cb,
+ .payload = payload,
+ .repo = odb->repo,
+ };
odb_for_each_alternate(odb, refs_from_alternate_cb, &data);
}
@@ -481,7 +485,7 @@ int odb_for_each_alternate(struct object_database *odb,
int r = 0;
for (alternate = odb->sources->next; alternate; alternate = alternate->next) {
- r = cb(alternate, payload);
+ r = cb(odb_source_files_downcast(alternate)->dirs, payload);
if (r)
break;
}
Okay, so here we call the callbacks with the `dirs` now and this
corresponds with the changes in the rest of the patch. Makes sense.
[snip]