From 3d5df01b5e42416a59e857135e932bbdd8cc3ba0 Mon Sep 17 00:00:00 2001 From: Derrick Stolee Date: Tue, 10 Apr 2018 08:56:07 -0400 Subject: commit-graph: build graph from starting commits Teach git-commit-graph to read commits from stdin when the --stdin-commits flag is specified. Commits reachable from these commits are added to the graph. This is a much faster way to construct the graph than inspecting all packed objects, but is restricted to known tips. For the Linux repository, 700,000+ commits were added to the graph file starting from 'master' in 7-9 seconds, depending on the number of packfiles in the repo (1, 24, or 120). Signed-off-by: Derrick Stolee Signed-off-by: Junio C Hamano --- commit-graph.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'commit-graph.h') diff --git a/commit-graph.h b/commit-graph.h index f065f0866f..fd035101b2 100644 --- a/commit-graph.h +++ b/commit-graph.h @@ -38,6 +38,8 @@ struct commit_graph *load_commit_graph_one(const char *graph_file); void write_commit_graph(const char *obj_dir, const char **pack_indexes, - int nr_packs); + int nr_packs, + const char **commit_hex, + int nr_commits); #endif -- cgit v1.2.1