diff options
author | Brandon Williams <bmwill@google.com> | 2018-06-28 01:30:22 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-06-28 19:33:29 +0300 |
commit | 989b8c4452f63f415c276df348defce6df613696 (patch) | |
tree | 029de07c0156624befefe59adc7dfdf569f1c264 /transport-helper.c | |
parent | 6d1700d564bbd3ecfe11f9889ed3f35a118b9f6a (diff) |
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>
Diffstat (limited to 'transport-helper.c')
-rw-r--r-- | transport-helper.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/transport-helper.c b/transport-helper.c index 1f8ff7e942..8b5abca29f 100644 --- a/transport-helper.c +++ b/transport-helper.c @@ -651,14 +651,16 @@ static int connect_helper(struct transport *transport, const char *name, } static int fetch(struct transport *transport, - int nr_heads, struct ref **to_fetch) + int nr_heads, struct ref **to_fetch, + struct ref **fetched_refs) { struct helper_data *data = transport->data; int i, count; if (process_connect(transport, 0)) { do_take_over(transport); - return transport->vtable->fetch(transport, nr_heads, to_fetch); + return transport->vtable->fetch(transport, nr_heads, to_fetch, + fetched_refs); } count = 0; |