git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2] doc: add caveat about turning off commit-graph

From
Kkristofferhaugsbakk@fastmail.com <kristofferhaugsbakk@fastmail.com>
Date
May 7, 2026, 18:20 UTC
Message-ID
<V2_caveat_commit-graph.68b@msgid.xyz>
In-Reply-To
<caveat_commit-graph.671@msgid.xyz>
From: Kristoffer Haugsbakk <code@khaugsbakk.name>

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).

Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
---
Notes (series):
    v2: Incorporate “performance issues” suggestion on git-replace(1)
 Documentation/git-commit-graph.adoc | 6 ++++++
 Documentation/git-replace.adoc      | 7 +++++++
 2 files changed, 13 insertions(+)
diff --git a/Documentation/git-commit-graph.adoc b/Documentation/git-commit-graph.adoc
index 6d19026035f..f2a37e91634 100644
--- a/Documentation/git-commit-graph.adoc
+++ b/Documentation/git-commit-graph.adoc
@@ -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
 -------------
 
diff --git a/Documentation/git-replace.adoc b/Documentation/git-replace.adoc
index 0a65460adbd..436a0e58caf 100644
--- a/Documentation/git-replace.adoc
+++ b/Documentation/git-replace.adoc
@@ -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]

Interdiff against v1:
  diff --git a/Documentation/git-replace.adoc b/Documentation/git-replace.adoc
  index 2c0ea07724d..436a0e58caf 100644
  --- a/Documentation/git-replace.adoc
  +++ b/Documentation/git-replace.adoc
  @@ -149,7 +149,8 @@ CAVEATS
   -------
   
   The existence of replace objects or commit grafts turns off reading or
  -writing to the commit-graph. See linkgit:git-commit-graph[1].
  +writing to the commit-graph, which can cause performance issues. See
  +linkgit:git-commit-graph[1].
   
   SEE ALSO
   --------

base-commit: 67ad42147a7acc2af6074753ebd03d904476118f
-- 
2.54.0.13.g9c7419e39f8
Previous: Derrick StoleeNext: Derrick Stolee
Message 5 of 12 in “doc: add caveat about turning off commit-graph”
  1. doc: add caveat about turning off commit-graphkristofferhaugsbakk@fastmail.com, May 5, 2026
  2. Derrick StoleeMay 6, 2026
  3. Kristoffer HaugsbakkMay 7, 2026
  4. Derrick StoleeMay 7, 2026
  5. doc: add caveat about turning off commit-graphkristofferhaugsbakk@fastmail.com, May 7, 2026
  6. Derrick StoleeMay 7, 2026
  7. doc: add caveat about turning off commit-graphkristofferhaugsbakk@fastmail.com, May 7, 2026
  8. Derrick StoleeMay 7, 2026
  9. Kristoffer HaugsbakkMay 7, 2026
  10. Junio C HamanoMay 11, 2026
  11. Oswald BuddenhagenMay 11, 2026
  12. Kristoffer HaugsbakkMay 20, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.