Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2018-06-28 01:30:22 +0300
committerJunio C Hamano <gitster@pobox.com>2018-06-28 19:33:29 +0300
commit989b8c4452f63f415c276df348defce6df613696 (patch)
tree029de07c0156624befefe59adc7dfdf569f1c264 /transport-internal.h
parent6d1700d564bbd3ecfe11f9889ed3f35a118b9f6a (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-internal.h')
-rw-r--r--transport-internal.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/transport-internal.h b/transport-internal.h
index 1cde6258a7..eeb6c340e5 100644
--- a/transport-internal.h
+++ b/transport-internal.h
@@ -36,11 +36,18 @@ struct transport_vtable {
* Fetch the objects for the given refs. Note that this gets
* an array, and should ignore the list structure.
*
+ * The transport *may* provide, in fetched_refs, the list of refs that
+ * it fetched. If the transport knows anything about the fetched refs
+ * that the caller does not know (for example, shallow status), it
+ * should provide that list of refs and include that information in the
+ * list.
+ *
* If the transport did not get hashes for refs in
* get_refs_list(), it should set the old_sha1 fields in the
* provided refs now.
**/
- int (*fetch)(struct transport *transport, int refs_nr, struct ref **refs);
+ int (*fetch)(struct transport *transport, int refs_nr, struct ref **refs,
+ struct ref **fetched_refs);
/**
* Push the objects and refs. Send the necessary objects, and