summaryrefslogtreecommitdiff
path: root/include/git2/sys
diff options
context:
space:
mode:
authorlhchavez <lhchavez@lhchavez.com>2020-02-18 00:02:13 +0000
committerlhchavez <lhchavez@lhchavez.com>2021-08-27 04:12:16 -0700
commitea285904dcb1350d99703df86a5f38662935cbbc (patch)
treefaeda30d856e43a6939f4ca13f0f41774fa6b9d7 /include/git2/sys
parent9d117e3857b447b47df38081d7f40f4b2226621b (diff)
downloadlibgit2-ea285904dcb1350d99703df86a5f38662935cbbc.tar.gz
midx: Introduce git_odb_write_multi_pack_index()
This change introduces git_odb_write_multi_pack_index(), which creates a `multi-pack-index` file from all the `.pack` files that have been loaded in the ODB. Fixes: #5399
Diffstat (limited to 'include/git2/sys')
-rw-r--r--include/git2/sys/odb_backend.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/git2/sys/odb_backend.h b/include/git2/sys/odb_backend.h
index 4dba460af..9ae0ed9b3 100644
--- a/include/git2/sys/odb_backend.h
+++ b/include/git2/sys/odb_backend.h
@@ -85,6 +85,13 @@ struct git_odb_backend {
git_indexer_progress_cb progress_cb, void *progress_payload);
/**
+ * If the backend supports pack files, this will create a
+ * `multi-pack-index` file which will contain an index of all objects
+ * across all the `.pack` files.
+ */
+ int GIT_CALLBACK(writemidx)(git_odb_backend *);
+
+ /**
* "Freshens" an already existing object, updating its last-used
* time. This occurs when `git_odb_write` was called, but the
* object already existed (and will not be re-written). The