]> git.ipfire.org Git - thirdparty/git.git/commitdiff
doc: add caveat about turning off commit-graph
authorKristoffer Haugsbakk <code@khaugsbakk.name>
Thu, 7 May 2026 19:42:28 +0000 (21:42 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 8 May 2026 01:22:33 +0000 (10:22 +0900)
The doc `technical/commit-graph.adoc` says that replace objects and
commit grafts turn off commit-graph:

    Commit grafts and replace objects can change the shape of the commit
    history. The latter can also be enabled/disabled on the fly using
    `--no-replace-objects`. This leads to difficulty storing both possible
    interpretations of a commit id, especially when computing generation
    numbers. The commit-graph will not be read or written when
    replace-objects or grafts are present.

But this isn’t mentioned in the user-facing doc. Let’s mention it on
git-replace(1) and git-commit-graph(1).

Acked-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-commit-graph.adoc
Documentation/git-replace.adoc

index 6d19026035f96a8a9ad455ab3d1331f86006cd7a..f2a37e916344423a9fe5433feea3ad2648f2378a 100644 (file)
@@ -146,6 +146,12 @@ $ git show-ref -s | git commit-graph write --stdin-commits
 $ git rev-parse HEAD | git commit-graph write --stdin-commits --append
 ------------------------------------------------
 
+CAVEATS
+-------
+
+The existence of replace objects or commit grafts turns off reading or
+writing to the commit-graph. See linkgit:git-replace[1].
+
 CONFIGURATION
 -------------
 
index 0a65460adbded52c7d699228a7b3247c5fdf7fad..436a0e58caf0afcb12367a22fda8ca9059956da4 100644 (file)
@@ -145,6 +145,13 @@ commit instead of the replaced commit.
 There may be other problems when using 'git rev-list' related to
 pending objects.
 
+CAVEATS
+-------
+
+The existence of replace objects or commit grafts turns off reading or
+writing to the commit-graph, which can cause performance issues. See
+linkgit:git-commit-graph[1].
+
 SEE ALSO
 --------
 linkgit:git-hash-object[1]