aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-commit-graph.txt
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2018-04-10 08:56:07 -0400
committerJunio C Hamano <gitster@pobox.com>2018-04-11 10:43:02 +0900
commit3d5df01b5e42416a59e857135e932bbdd8cc3ba0 (patch)
tree39368eb806a613e4d98876c5d5d3b2b4eef5683e /Documentation/git-commit-graph.txt
parent049d51a2bb9a03d2f2c2cce1ae41e57dbbf42244 (diff)
downloadgit-3d5df01b5e42416a59e857135e932bbdd8cc3ba0.tar.gz
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 <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-commit-graph.txt')
-rw-r--r--Documentation/git-commit-graph.txt14
1 files changed, 13 insertions, 1 deletions
diff --git a/Documentation/git-commit-graph.txt b/Documentation/git-commit-graph.txt
index 8143cc3f07..442ac243e6 100644
--- a/Documentation/git-commit-graph.txt
+++ b/Documentation/git-commit-graph.txt
@@ -36,7 +36,13 @@ COMMANDS
Write a commit graph file based on the commits found in packfiles.
+
With the `--stdin-packs` option, generate the new commit graph by
-walking objects only in the specified pack-indexes.
+walking objects only in the specified pack-indexes. (Cannot be combined
+with --stdin-commits.)
++
+With the `--stdin-commits` option, generate the new commit graph by
+walking commits starting at the commits specified in stdin as a list
+of OIDs in hex, one OID per line. (Cannot be combined with
+--stdin-packs.)
'read'::
@@ -60,6 +66,12 @@ $ git commit-graph write
$ echo <pack-index> | git commit-graph write --stdin-packs
------------------------------------------------
+* Write a graph file containing all reachable commits.
++
+------------------------------------------------
+$ git show-ref -s | git commit-graph write --stdin-commits
+------------------------------------------------
+
* Read basic information from the commit-graph file.
+
------------------------------------------------