summaryrefslogtreecommitdiff
path: root/transport.h
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2018-06-27 22:30:22 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-06-28 16:33:29 (GMT)
commit989b8c4452f63f415c276df348defce6df613696 (patch)
tree029de07c0156624befefe59adc7dfdf569f1c264 /transport.h
parent6d1700d564bbd3ecfe11f9889ed3f35a118b9f6a (diff)
downloadgit-989b8c4452f63f415c276df348defce6df613696.zip
git-989b8c4452f63f415c276df348defce6df613696.tar.gz
git-989b8c4452f63f415c276df348defce6df613696.tar.bz2
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.h')
-rw-r--r--transport.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/transport.h b/transport.h
index 7792b08..3dff767 100644
--- a/transport.h
+++ b/transport.h
@@ -218,7 +218,8 @@ int transport_push(struct transport *connection,
const struct ref *transport_get_remote_refs(struct transport *transport,
const struct argv_array *ref_prefixes);
-int transport_fetch_refs(struct transport *transport, struct ref *refs);
+int transport_fetch_refs(struct transport *transport, struct ref *refs,
+ struct ref **fetched_refs);
void transport_unlock_pack(struct transport *transport);
int transport_disconnect(struct transport *transport);
char *transport_anonymize_url(const char *url);