fetch-pack: put shallow info in output parameter
Expand the transport fetch method signature, by adding an output parameter, to allow transports to return information about the refs they have fetched. Then communicate shallow status information through this mechanism instead of by modifying the input list of refs. This does require clients to sometimes generate the ref map twice: once from the list of refs provided by the remote (as is currently done) and potentially once from the new list of refs that the fetch mechanism provides. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
6d1700d564
commit
989b8c4452
@ -19,7 +19,7 @@ static void fetch_refs(const char *remote_name, struct ref *ref)
|
||||
|
||||
transport_set_option(transport, TRANS_OPT_FROM_PROMISOR, "1");
|
||||
transport_set_option(transport, TRANS_OPT_NO_DEPENDENTS, "1");
|
||||
transport_fetch_refs(transport, ref);
|
||||
transport_fetch_refs(transport, ref, NULL);
|
||||
fetch_if_missing = original_fetch_if_missing;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user