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

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'include/git2/common.h')
-rw-r--r--include/git2/common.h41
1 files changed, 19 insertions, 22 deletions
diff --git a/include/git2/common.h b/include/git2/common.h
index dca0c9c21..32237efed 100644
--- a/include/git2/common.h
+++ b/include/git2/common.h
@@ -37,13 +37,6 @@
# define GIT_EXTERN(type) extern type
#endif
-/** Declare a function as always inlined. */
-#if defined(_MSC_VER)
-# define GIT_INLINE(type) static __inline type
-#else
-# define GIT_INLINE(type) static inline type
-#endif
-
/** Declare a function's takes printf style arguments. */
#ifdef __GNUC__
# define GIT_FORMAT_PRINTF(a,b) __attribute__((format (printf, a, b)))
@@ -101,29 +94,34 @@ GIT_BEGIN_DECL
GIT_EXTERN(void) git_libgit2_version(int *major, int *minor, int *rev);
/**
- * Combinations of these values describe the capabilities of libgit2.
+ * Combinations of these values describe the features with which libgit2
+ * was compiled
*/
typedef enum {
- GIT_CAP_THREADS = ( 1 << 0 ),
- GIT_CAP_HTTPS = ( 1 << 1 ),
- GIT_CAP_SSH = ( 1 << 2 ),
-} git_cap_t;
+ GIT_FEATURE_THREADS = (1 << 0),
+ GIT_FEATURE_HTTPS = (1 << 1),
+ GIT_FEATURE_SSH = (1 << 2),
+} git_feature_t;
/**
* Query compile time options for libgit2.
*
- * @return A combination of GIT_CAP_* values.
+ * @return A combination of GIT_FEATURE_* values.
*
- * - GIT_CAP_THREADS
+ * - GIT_FEATURE_THREADS
* Libgit2 was compiled with thread support. Note that thread support is
* still to be seen as a 'work in progress' - basic object lookups are
* believed to be threadsafe, but other operations may not be.
*
- * - GIT_CAP_HTTPS
+ * - GIT_FEATURE_HTTPS
* Libgit2 supports the https:// protocol. This requires the openssl
* library to be found when compiling libgit2.
+ *
+ * - GIT_FEATURE_SSH
+ * Libgit2 supports the SSH protocol for network operations. This requires
+ * the libssh2 library to be found when compiling libgit2
*/
-GIT_EXTERN(int) git_libgit2_capabilities(void);
+GIT_EXTERN(int) git_libgit2_features(void);
typedef enum {
@@ -163,12 +161,12 @@ typedef enum {
* >Set the maximum amount of memory that can be mapped at any time
* by the library
*
- * * opts(GIT_OPT_GET_SEARCH_PATH, int level, char *out, size_t len)
+ * * opts(GIT_OPT_GET_SEARCH_PATH, int level, git_buf *buf)
*
* > Get the search path for a given level of config data. "level" must
* > be one of `GIT_CONFIG_LEVEL_SYSTEM`, `GIT_CONFIG_LEVEL_GLOBAL`, or
* > `GIT_CONFIG_LEVEL_XDG`. The search path is written to the `out`
- * > buffer up to size `len`. Returns GIT_EBUFS if buffer is too small.
+ * > buffer.
*
* * opts(GIT_OPT_SET_SEARCH_PATH, int level, const char *path)
*
@@ -197,7 +195,7 @@ typedef enum {
* > across all repositories before libgit2 starts evicting objects
* > from the cache. This is a soft limit, in that the library might
* > briefly exceed it, but will start aggressively evicting objects
- * > from cache when that happens. The default cache size is 256Mb.
+ * > from cache when that happens. The default cache size is 256MB.
*
* * opts(GIT_OPT_ENABLE_CACHING, int enabled)
*
@@ -212,11 +210,10 @@ typedef enum {
* > Get the current bytes in cache and the maximum that would be
* > allowed in the cache.
*
- * * opts(GIT_OPT_GET_TEMPLATE_PATH, char *out, size_t len)
+ * * opts(GIT_OPT_GET_TEMPLATE_PATH, git_buf *out)
*
* > Get the default template path.
- * > The path is written to the `out`
- * > buffer up to size `len`. Returns GIT_EBUFS if buffer is too small.
+ * > The path is written to the `out` buffer.
*
* * opts(GIT_OPT_SET_TEMPLATE_PATH, const char *path)
*