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

Function write_commit_graph_reachable

commit-graph.c:1903–1930  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1901}
1902
1903int write_commit_graph_reachable(struct odb_source *source,
1904 enum commit_graph_write_flags flags,
1905 const struct commit_graph_opts *opts)
1906{
1907 struct oidset commits = OIDSET_INIT;
1908 struct refs_cb_data data;
1909 int result;
1910
1911 memset(&data, 0, sizeof(data));
1912 data.repo = source->odb->repo;
1913 data.commits = &commits;
1914
1915 if (flags & COMMIT_GRAPH_WRITE_PROGRESS)
1916 data.progress = start_delayed_progress(
1917 source->odb->repo,
1918 _("Collecting referenced commits"), 0);
1919
1920 refs_for_each_ref(get_main_ref_store(source->odb->repo), add_ref_to_set,
1921 &data);
1922
1923 stop_progress(&data.progress);
1924
1925 result = write_commit_graph(source, NULL, &commits,
1926 flags, opts);
1927
1928 oidset_clear(&commits);
1929 return result;
1930}
1931
1932static int fill_oids_from_packs(struct write_commit_graph_context *ctx,
1933 const struct string_list *pack_indexes)

Callers 4

cmd_fetchFunction · 0.85
graph_writeFunction · 0.85
cmd_gcFunction · 0.85

Calls 6

start_delayed_progressFunction · 0.85
refs_for_each_refFunction · 0.85
get_main_ref_storeFunction · 0.85
stop_progressFunction · 0.85
write_commit_graphFunction · 0.85
oidset_clearFunction · 0.85

Tested by

no test coverage detected