summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
authorGaurav Saral <gsaral@microsoft.com>2017-02-08 16:22:44 +0530
committerGaurav Saral <gsaral@microsoft.com>2017-02-10 15:22:00 +0530
commit61acc9fadebe895439a19b63074da03ed65b9bd8 (patch)
tree23db34ee1dee5a146f55e9ff81299ee1602a2aa4 /include/git2
parentbe249bca1bb79266a286b93f3e41dd6888d348a4 (diff)
downloadlibgit2-61acc9fadebe895439a19b63074da03ed65b9bd8.tar.gz
Changes to provide option to turn off/on ofs_delta
This change provides an option in git_libgit2_opt_t which can be used in git_libgit2_opts to turn off/on ofs_delta capability in libGit2
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/common.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/git2/common.h b/include/git2/common.h
index 5be7fb632..f13dfd509 100644
--- a/include/git2/common.h
+++ b/include/git2/common.h
@@ -178,6 +178,7 @@ typedef enum {
GIT_OPT_ENABLE_STRICT_SYMBOLIC_REF_CREATION,
GIT_OPT_SET_SSL_CIPHERS,
GIT_OPT_GET_USER_AGENT,
+ GIT_OPT_ENABLE_OFS_DELTA,
} git_libgit2_opt_t;
/**
@@ -305,6 +306,16 @@ typedef enum {
* >
* > - `ciphers` is the list of ciphers that are eanbled.
*
+ * * opts(GIT_OPT_ENABLE_OFS_DELTA, int enabled)
+ *
+ * > Enable or disable the use of "offset deltas" when creating packfiles,
+ * > and the negotiation of them when talking to a remote server.
+ * > Offset deltas store a delta base location as an offset into the
+ * > packfile from the current location, which provides a shorter encoding
+ * > and thus smaller resultant packfiles.
+ * > Packfiles containing offset deltas can still be read.
+ * > This defaults to enabled.
+ *
* @param option Option key
* @param ... value to set the option
* @return 0 on success, <0 on failure