summaryrefslogtreecommitdiff
path: root/commit-graph.h
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2019-06-18 18:14:32 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-06-20 03:46:26 (GMT)
commitc2bc6e6ab0ade70c475a73d06326e677e70840d2 (patch)
tree20d1dd905115b734e05c4db5711bb8ac05693c66 /commit-graph.h
parent8d84097f9655a954ea7e94ba08d93e5940ccb2ae (diff)
downloadgit-c2bc6e6ab0ade70c475a73d06326e677e70840d2.zip
git-c2bc6e6ab0ade70c475a73d06326e677e70840d2.tar.gz
git-c2bc6e6ab0ade70c475a73d06326e677e70840d2.tar.bz2
commit-graph: create options for split files
The split commit-graph feature is now fully implemented, but needs some more run-time configurability. Allow direct callers to 'git commit-graph write --split' to specify the values used in the merge strategy and the expire time. Update the documentation to specify these values. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.h')
-rw-r--r--commit-graph.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/commit-graph.h b/commit-graph.h
index 802d352..a84c22a 100644
--- a/commit-graph.h
+++ b/commit-graph.h
@@ -75,17 +75,25 @@ int generation_numbers_enabled(struct repository *r);
#define COMMIT_GRAPH_PROGRESS (1 << 1)
#define COMMIT_GRAPH_SPLIT (1 << 2)
+struct split_commit_graph_opts {
+ int size_multiple;
+ int max_commits;
+ timestamp_t expire_time;
+};
+
/*
* The write_commit_graph* methods return zero on success
* and a negative value on failure. Note that if the repository
* is not compatible with the commit-graph feature, then the
* methods will return 0 without writing a commit-graph.
*/
-int write_commit_graph_reachable(const char *obj_dir, unsigned int flags);
+int write_commit_graph_reachable(const char *obj_dir, unsigned int flags,
+ const struct split_commit_graph_opts *split_opts);
int write_commit_graph(const char *obj_dir,
struct string_list *pack_indexes,
struct string_list *commit_hex,
- unsigned int flags);
+ unsigned int flags,
+ const struct split_commit_graph_opts *split_opts);
int verify_commit_graph(struct repository *r, struct commit_graph *g);