commit-graph: build graph from starting commits
authorDerrick Stolee <stolee@gmail.com>
Mon, 19 Feb 2018 18:53:26 +0000 (13:53 -0500)
committerJunio C Hamano <gitster@pobox.com>
Tue, 20 Feb 2018 20:30:06 +0000 (12:30 -0800)
commitd5d591ed9a9be2b4bf5b77e87d16f60a83c817c2
tree048d3ce819e28b715005b8c176771f296942788a
parent758c86cbbb82d2a04a3e4e611cd67ef284241518
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). If a commit graph file
already exists (and core.commitGraph=true), then this operation takes
only 1.8 seconds due to less time spent parsing commits.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-commit-graph.txt
builtin/commit-graph.c
commit-graph.c
commit-graph.h
t/t5318-commit-graph.sh