@@ -962,7 +962,7 @@ struct write_commit_graph_context {
962
962
changed_paths :1 ,
963
963
order_by_pack :1 ;
964
964
965
- const struct split_commit_graph_opts * split_opts ;
965
+ const struct commit_graph_opts * opts ;
966
966
size_t total_bloom_filter_data_size ;
967
967
const struct bloom_filter_settings * bloom_settings ;
968
968
@@ -1286,8 +1286,8 @@ static void close_reachable(struct write_commit_graph_context *ctx)
1286
1286
{
1287
1287
int i ;
1288
1288
struct commit * commit ;
1289
- enum commit_graph_split_flags flags = ctx -> split_opts ?
1290
- ctx -> split_opts -> flags : COMMIT_GRAPH_SPLIT_UNSPECIFIED ;
1289
+ enum commit_graph_split_flags flags = ctx -> opts ?
1290
+ ctx -> opts -> split_flags : COMMIT_GRAPH_SPLIT_UNSPECIFIED ;
1291
1291
1292
1292
if (ctx -> report_progress )
1293
1293
ctx -> progress = start_delayed_progress (
@@ -1476,7 +1476,7 @@ static int add_ref_to_set(const char *refname,
1476
1476
1477
1477
int write_commit_graph_reachable (struct object_directory * odb ,
1478
1478
enum commit_graph_write_flags flags ,
1479
- const struct split_commit_graph_opts * split_opts )
1479
+ const struct commit_graph_opts * opts )
1480
1480
{
1481
1481
struct oidset commits = OIDSET_INIT ;
1482
1482
struct refs_cb_data data ;
@@ -1493,7 +1493,7 @@ int write_commit_graph_reachable(struct object_directory *odb,
1493
1493
stop_progress (& data .progress );
1494
1494
1495
1495
result = write_commit_graph (odb , NULL , & commits ,
1496
- flags , split_opts );
1496
+ flags , opts );
1497
1497
1498
1498
oidset_clear (& commits );
1499
1499
return result ;
@@ -1608,8 +1608,8 @@ static uint32_t count_distinct_commits(struct write_commit_graph_context *ctx)
1608
1608
static void copy_oids_to_commits (struct write_commit_graph_context * ctx )
1609
1609
{
1610
1610
uint32_t i ;
1611
- enum commit_graph_split_flags flags = ctx -> split_opts ?
1612
- ctx -> split_opts -> flags : COMMIT_GRAPH_SPLIT_UNSPECIFIED ;
1611
+ enum commit_graph_split_flags flags = ctx -> opts ?
1612
+ ctx -> opts -> split_flags : COMMIT_GRAPH_SPLIT_UNSPECIFIED ;
1613
1613
1614
1614
ctx -> num_extra_edges = 0 ;
1615
1615
if (ctx -> report_progress )
@@ -1894,13 +1894,13 @@ static void split_graph_merge_strategy(struct write_commit_graph_context *ctx)
1894
1894
int max_commits = 0 ;
1895
1895
int size_mult = 2 ;
1896
1896
1897
- if (ctx -> split_opts ) {
1898
- max_commits = ctx -> split_opts -> max_commits ;
1897
+ if (ctx -> opts ) {
1898
+ max_commits = ctx -> opts -> max_commits ;
1899
1899
1900
- if (ctx -> split_opts -> size_multiple )
1901
- size_mult = ctx -> split_opts -> size_multiple ;
1900
+ if (ctx -> opts -> size_multiple )
1901
+ size_mult = ctx -> opts -> size_multiple ;
1902
1902
1903
- flags = ctx -> split_opts -> flags ;
1903
+ flags = ctx -> opts -> split_flags ;
1904
1904
}
1905
1905
1906
1906
g = ctx -> r -> objects -> commit_graph ;
@@ -2078,8 +2078,8 @@ static void expire_commit_graphs(struct write_commit_graph_context *ctx)
2078
2078
size_t dirnamelen ;
2079
2079
timestamp_t expire_time = time (NULL );
2080
2080
2081
- if (ctx -> split_opts && ctx -> split_opts -> expire_time )
2082
- expire_time = ctx -> split_opts -> expire_time ;
2081
+ if (ctx -> opts && ctx -> opts -> expire_time )
2082
+ expire_time = ctx -> opts -> expire_time ;
2083
2083
if (!ctx -> split ) {
2084
2084
char * chain_file_name = get_chain_filename (ctx -> odb );
2085
2085
unlink (chain_file_name );
@@ -2130,7 +2130,7 @@ int write_commit_graph(struct object_directory *odb,
2130
2130
struct string_list * pack_indexes ,
2131
2131
struct oidset * commits ,
2132
2132
enum commit_graph_write_flags flags ,
2133
- const struct split_commit_graph_opts * split_opts )
2133
+ const struct commit_graph_opts * opts )
2134
2134
{
2135
2135
struct write_commit_graph_context * ctx ;
2136
2136
uint32_t i , count_distinct = 0 ;
@@ -2147,7 +2147,7 @@ int write_commit_graph(struct object_directory *odb,
2147
2147
ctx -> append = flags & COMMIT_GRAPH_WRITE_APPEND ? 1 : 0 ;
2148
2148
ctx -> report_progress = flags & COMMIT_GRAPH_WRITE_PROGRESS ? 1 : 0 ;
2149
2149
ctx -> split = flags & COMMIT_GRAPH_WRITE_SPLIT ? 1 : 0 ;
2150
- ctx -> split_opts = split_opts ;
2150
+ ctx -> opts = opts ;
2151
2151
ctx -> total_bloom_filter_data_size = 0 ;
2152
2152
2153
2153
bloom_settings .bits_per_entry = git_env_ulong ("GIT_TEST_BLOOM_SETTINGS_BITS_PER_ENTRY" ,
@@ -2195,15 +2195,15 @@ int write_commit_graph(struct object_directory *odb,
2195
2195
}
2196
2196
}
2197
2197
2198
- if (ctx -> split_opts )
2199
- replace = ctx -> split_opts -> flags & COMMIT_GRAPH_SPLIT_REPLACE ;
2198
+ if (ctx -> opts )
2199
+ replace = ctx -> opts -> split_flags & COMMIT_GRAPH_SPLIT_REPLACE ;
2200
2200
}
2201
2201
2202
2202
ctx -> approx_nr_objects = approximate_object_count ();
2203
2203
ctx -> oids .alloc = ctx -> approx_nr_objects / 32 ;
2204
2204
2205
- if (ctx -> split && split_opts && ctx -> oids .alloc > split_opts -> max_commits )
2206
- ctx -> oids .alloc = split_opts -> max_commits ;
2205
+ if (ctx -> split && opts && ctx -> oids .alloc > opts -> max_commits )
2206
+ ctx -> oids .alloc = opts -> max_commits ;
2207
2207
2208
2208
if (ctx -> append ) {
2209
2209
prepare_commit_graph_one (ctx -> r , ctx -> odb );
0 commit comments