diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/git2/sys/remote.h | 31 | ||||
-rw-r--r-- | include/git2/sys/transport.h | 10 |
2 files changed, 41 insertions, 0 deletions
diff --git a/include/git2/sys/remote.h b/include/git2/sys/remote.h new file mode 100644 index 000000000..dd243ca55 --- /dev/null +++ b/include/git2/sys/remote.h @@ -0,0 +1,31 @@ +/* + * Copyright (C) the libgit2 contributors. All rights reserved. + * + * This file is part of libgit2, distributed under the GNU GPL v2 with + * a Linking Exception. For full terms see the included COPYING file. + */ + +#ifndef INCLUDE_sys_git_remote_h +#define INCLUDE_sys_git_remote_h + +/** + * @file git2/sys/remote.h + * @brief Low-level remote functionality for custom transports + * @defgroup git_remote Low-level remote functionality + * @ingroup Git + * @{ +*/ + +GIT_BEGIN_DECL + +typedef enum { + /** Remote supports fetching an advertised object by ID. */ + GIT_REMOTE_CAPABILITY_TIP_OID = (1 << 0), + + /** Remote supports fetching an individual reachable object. */ + GIT_REMOTE_CAPABILITY_REACHABLE_OID = (1 << 1), +} git_remote_capability_t; + +/** @} */ +GIT_END_DECL +#endif diff --git a/include/git2/sys/transport.h b/include/git2/sys/transport.h index 89e687649..f0c2a3eab 100644 --- a/include/git2/sys/transport.h +++ b/include/git2/sys/transport.h @@ -47,6 +47,16 @@ struct git_transport { const git_remote_connect_options *connect_opts); /** + * Gets the capabilities for this remote repository. + * + * This function may be called after a successful call to + * `connect()`. + */ + int GIT_CALLBACK(capabilities)( + unsigned int *capabilities, + git_transport *transport); + + /** * Get the list of available references in the remote repository. * * This function may be called after a successful call to |