@@ -10,7 +10,7 @@ static char const * const builtin_commit_graph_usage[] = {
10
10
N_ ("git commit-graph [--object-dir <objdir>]" ),
11
11
N_ ("git commit-graph read [--object-dir <objdir>]" ),
12
12
N_ ("git commit-graph verify [--object-dir <objdir>]" ),
13
- N_ ("git commit-graph write [--object-dir <objdir>] [--append] [--reachable|--stdin-packs|--stdin-commits]" ),
13
+ N_ ("git commit-graph write [--object-dir <objdir>] [--append|--split ] [--reachable|--stdin-packs|--stdin-commits]" ),
14
14
NULL
15
15
};
16
16
@@ -25,7 +25,7 @@ static const char * const builtin_commit_graph_read_usage[] = {
25
25
};
26
26
27
27
static const char * const builtin_commit_graph_write_usage [] = {
28
- N_ ("git commit-graph write [--object-dir <objdir>] [--append] [--reachable|--stdin-packs|--stdin-commits]" ),
28
+ N_ ("git commit-graph write [--object-dir <objdir>] [--append|--split ] [--reachable|--stdin-packs|--stdin-commits]" ),
29
29
NULL
30
30
};
31
31
@@ -35,9 +35,9 @@ static struct opts_commit_graph {
35
35
int stdin_packs ;
36
36
int stdin_commits ;
37
37
int append ;
38
+ int split ;
38
39
} opts ;
39
40
40
-
41
41
static int graph_verify (int argc , const char * * argv )
42
42
{
43
43
struct commit_graph * graph = NULL ;
@@ -156,6 +156,8 @@ static int graph_write(int argc, const char **argv)
156
156
N_ ("start walk at commits listed by stdin" )),
157
157
OPT_BOOL (0 , "append" , & opts .append ,
158
158
N_ ("include all commits already in the commit-graph file" )),
159
+ OPT_BOOL (0 , "split" , & opts .split ,
160
+ N_ ("allow writing an incremental commit-graph file" )),
159
161
OPT_END (),
160
162
};
161
163
@@ -169,6 +171,8 @@ static int graph_write(int argc, const char **argv)
169
171
opts .obj_dir = get_object_directory ();
170
172
if (opts .append )
171
173
flags |= COMMIT_GRAPH_APPEND ;
174
+ if (opts .split )
175
+ flags |= COMMIT_GRAPH_SPLIT ;
172
176
173
177
read_replace_refs = 0 ;
174
178
0 commit comments