MCPcopy Index your code
hub / github.com/git/git / should_write_commit_graph

Function should_write_commit_graph

builtin/gc.c:1161–1182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1159}
1160
1161static int should_write_commit_graph(struct gc_config *cfg UNUSED)
1162{
1163 int result;
1164 struct cg_auto_data data;
1165
1166 data.num_not_in_graph = 0;
1167 data.limit = 100;
1168 repo_config_get_int(the_repository, "maintenance.commit-graph.auto",
1169 &data.limit);
1170
1171 if (!data.limit)
1172 return 0;
1173 if (data.limit < 0)
1174 return 1;
1175
1176 result = refs_for_each_ref(get_main_ref_store(the_repository),
1177 dfs_on_ref, &data);
1178
1179 repo_clear_commit_marks(the_repository, SEEN);
1180
1181 return result;
1182}
1183
1184static int run_write_commit_graph(struct maintenance_run_opts *opts)
1185{

Callers

nothing calls this directly

Calls 4

repo_config_get_intFunction · 0.85
refs_for_each_refFunction · 0.85
get_main_ref_storeFunction · 0.85
repo_clear_commit_marksFunction · 0.85

Tested by

no test coverage detected