diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2022-02-06 09:36:51 -0500 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2022-02-06 15:01:15 -0500 |
commit | 923c16527c30c7ad067ebb308b1572b3d163b54c (patch) | |
tree | f248a433b800c2a80440ac7899b2d241e274c64d /src | |
parent | b523776785e542792bd22f185ed0a678ab07c872 (diff) | |
download | libgit2-923c16527c30c7ad067ebb308b1572b3d163b54c.tar.gz |
transport: add capabilities query function
Diffstat (limited to 'src')
-rw-r--r-- | src/transports/local.c | 9 | ||||
-rw-r--r-- | src/transports/smart.c | 9 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/transports/local.c b/src/transports/local.c index 86524edf1..0c768fad8 100644 --- a/src/transports/local.c +++ b/src/transports/local.c @@ -256,6 +256,14 @@ static int local_set_connect_opts( return git_remote_connect_options_normalize(&t->connect_opts, t->owner->repo, connect_opts); } +static int local_capabilities(unsigned int *capabilities, git_transport *transport) +{ + GIT_UNUSED(transport); + + *capabilities = 0; + return 0; +} + static int local_ls(const git_remote_head ***out, size_t *size, git_transport *transport) { transport_local *t = (transport_local *)transport; @@ -721,6 +729,7 @@ int git_transport_local(git_transport **out, git_remote *owner, void *param) t->parent.version = GIT_TRANSPORT_VERSION; t->parent.connect = local_connect; t->parent.set_connect_opts = local_set_connect_opts; + t->parent.capabilities = local_capabilities; t->parent.negotiate_fetch = local_negotiate_fetch; t->parent.download_pack = local_download_pack; t->parent.push = local_push; diff --git a/src/transports/smart.c b/src/transports/smart.c index e76c18fc3..3b58b84da 100644 --- a/src/transports/smart.c +++ b/src/transports/smart.c @@ -226,6 +226,14 @@ static int git_smart__set_connect_opts( return git_remote_connect_options_normalize(&t->connect_opts, t->owner->repo, opts); } +static int git_smart__capabilities(unsigned int *capabilities, git_transport *transport) +{ + GIT_UNUSED(transport); + + *capabilities = 0; + return 0; +} + static int git_smart__ls(const git_remote_head ***out, size_t *size, git_transport *transport) { transport_smart *t = GIT_CONTAINER_OF(transport, transport_smart, parent); @@ -423,6 +431,7 @@ int git_transport_smart(git_transport **out, git_remote *owner, void *param) t->parent.version = GIT_TRANSPORT_VERSION; t->parent.connect = git_smart__connect; t->parent.set_connect_opts = git_smart__set_connect_opts; + t->parent.capabilities = git_smart__capabilities; t->parent.close = git_smart__close; t->parent.free = git_smart__free; t->parent.negotiate_fetch = git_smart__negotiate_fetch; |