summaryrefslogtreecommitdiff
path: root/include/git2/sys/transport.h
diff options
context:
space:
mode:
authoryuangli <yuangli@mathworks.com>2022-07-04 17:08:04 +0100
committeryuangli <yuangli@mathworks.com>2022-07-04 17:08:04 +0100
commitafa79ca05862c24baa0360324ab7b63c0df90689 (patch)
treefbaa0ddf5f5176e5fb8d83ed7e0db72209473c87 /include/git2/sys/transport.h
parent70a332a51b6364507d19bd1821b22fabbd1f2e08 (diff)
downloadlibgit2-afa79ca05862c24baa0360324ab7b63c0df90689.tar.gz
Merge branch 'pr/tiennou/4747' into transportPR
Diffstat (limited to 'include/git2/sys/transport.h')
-rw-r--r--include/git2/sys/transport.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/include/git2/sys/transport.h b/include/git2/sys/transport.h
index fee34544f..ea8bcb64b 100644
--- a/include/git2/sys/transport.h
+++ b/include/git2/sys/transport.h
@@ -33,6 +33,15 @@ typedef enum {
GIT_TRANSPORTFLAGS_NONE = 0,
} git_transport_flags_t;
+typedef struct git_shallowarray git_shallowarray;
+
+typedef struct {
+ const git_remote_head * const *refs;
+ size_t count;
+ git_shallowarray *shallow_roots;
+ int depth;
+} git_fetch_negotiation;
+
struct git_transport {
unsigned int version; /**< The struct version */
@@ -87,8 +96,7 @@ struct git_transport {
int GIT_CALLBACK(negotiate_fetch)(
git_transport *transport,
git_repository *repo,
- const git_remote_head * const *refs,
- size_t count);
+ const git_fetch_negotiation *fetch_data);
/**
* Start downloading the packfile from the remote repository.
@@ -435,6 +443,11 @@ GIT_EXTERN(int) git_smart_subtransport_ssh(
git_transport *owner,
void *param);
+GIT_EXTERN(size_t) git_shallowarray_count(git_shallowarray *array);
+GIT_EXTERN(const git_oid *) git_shallowarray_get(git_shallowarray *array, size_t idx);
+GIT_EXTERN(int) git_shallowarray_add(git_shallowarray *array, git_oid *oid);
+GIT_EXTERN(int) git_shallowarray_remove(git_shallowarray *array, git_oid *oid);
+
/** @} */
GIT_END_DECL
#endif