diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-05-01 13:39:52 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-05-01 13:39:52 -0700 |
commit | 6a1c17d05b0e67fa5f9661f492f407b984496b27 (patch) | |
tree | 2abe4b8ae7cb8eb78e93ca07cd1e9426a876297d /commit-graph.h | |
parent | 2b4ff3d3dc64d4abcded7caa9bcdf063aea5ec3f (diff) | |
parent | dbd5e0a1861c5bb1446e5518173aa1760c6617b0 (diff) |
Merge branch 'tb/commit-graph-split-strategy'
"git commit-graph write" learned different ways to write out split
files.
* tb/commit-graph-split-strategy:
Revert "commit-graph.c: introduce '--[no-]check-oids'"
commit-graph.c: introduce '--[no-]check-oids'
commit-graph.h: replace 'commit_hex' with 'commits'
oidset: introduce 'oidset_size'
builtin/commit-graph.c: introduce split strategy 'replace'
builtin/commit-graph.c: introduce split strategy 'no-merge'
builtin/commit-graph.c: support for '--split[=<strategy>]'
t/helper/test-read-graph.c: support commit-graph chains
Diffstat (limited to 'commit-graph.h')
-rw-r--r-- | commit-graph.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/commit-graph.h b/commit-graph.h index e87a6f6360..98ef121924 100644 --- a/commit-graph.h +++ b/commit-graph.h @@ -6,6 +6,7 @@ #include "string-list.h" #include "cache.h" #include "object-store.h" +#include "oidset.h" #define GIT_TEST_COMMIT_GRAPH "GIT_TEST_COMMIT_GRAPH" #define GIT_TEST_COMMIT_GRAPH_DIE_ON_LOAD "GIT_TEST_COMMIT_GRAPH_DIE_ON_LOAD" @@ -82,10 +83,17 @@ enum commit_graph_write_flags { COMMIT_GRAPH_WRITE_CHECK_OIDS = (1 << 3) }; +enum commit_graph_split_flags { + COMMIT_GRAPH_SPLIT_UNSPECIFIED = 0, + COMMIT_GRAPH_SPLIT_MERGE_PROHIBITED = 1, + COMMIT_GRAPH_SPLIT_REPLACE = 2 +}; + struct split_commit_graph_opts { int size_multiple; int max_commits; timestamp_t expire_time; + enum commit_graph_split_flags flags; }; /* @@ -99,7 +107,7 @@ int write_commit_graph_reachable(struct object_directory *odb, const struct split_commit_graph_opts *split_opts); int write_commit_graph(struct object_directory *odb, struct string_list *pack_indexes, - struct string_list *commit_hex, + struct oidset *commits, enum commit_graph_write_flags flags, const struct split_commit_graph_opts *split_opts); |