summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2017-11-12 10:35:18 +0000
committerPatrick Steinhardt <ps@pks.im>2018-06-22 09:52:12 +0200
commit5ec4aee952ed0db040277c16d1ac015c6e4bee3b (patch)
treee14337a5736c60c9a7dfc3a9e5ce096c32715358 /include
parentc16556aaddffc1d663c6403747d793adc0819e0a (diff)
downloadlibgit2-5ec4aee952ed0db040277c16d1ac015c6e4bee3b.tar.gz
indexer: add ability to select connectivity checks
Right now, we simply turn on connectivity checks in the indexer as soon as we have access to an object database. But seeing that the connectivity checks may incur additional overhead, we do want the user to decide for himself whether he wants to allow those checks. Furthermore, it might also be desirable to check connectivity in case where no object database is given at all, e.g. in case where a fully connected pack file is expected. Add a flag `verify` to `git_indexer_options` to enable additional verification checks. Also avoid to query the ODB in case none is given to allow users to enable checks when they do not have an ODB.
Diffstat (limited to 'include')
-rw-r--r--include/git2/indexer.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/git2/indexer.h b/include/git2/indexer.h
index 53a59fc81..94d8785c0 100644
--- a/include/git2/indexer.h
+++ b/include/git2/indexer.h
@@ -22,6 +22,9 @@ typedef struct git_indexer_options {
git_transfer_progress_cb progress_cb;
/** progress_cb_payload payload for the progress callback */
void *progress_cb_payload;
+
+ /** Do connectivity checks for the received pack */
+ unsigned char verify;
} git_indexer_options;
#define GIT_INDEXER_OPTIONS_VERSION 1