The best way to control Claude Code, Codex and more from any computer or phone
fix(server): diffs keep submodule changes under diff.submodule=log (#29852)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Alex Southwell committed
Nov 3, 2026 at 23:30 UTC
0673e7e61046087b2d714b7d064f555c778f0087
3 files changed
+10
-1
apps/server/src/checkpointing/CheckpointStore.test.ts
+7
@@ -159,6 +159,10 @@ it.layer(layerTest)("CheckpointStore.layer", (it) => {
159
yield* initRepoWithCommit(tmp);
160
yield* git(tmp, ["config", "diff.noprefix", "true"]);
161
yield* git(tmp, ["config", "diff.suppressBlankEmpty", "true"]);
162
+ yield* git(tmp, ["config", "diff.submodule", "log"]);
163
+ const sub = NodePath.join(tmp, "sub");
164
+ yield* git(tmp, ["init", "sub"]);
165
+ yield* initRepoWithCommit(sub);
166
const checkpointStore = yield* CheckpointStore.CheckpointStore;
167
const threadId = ThreadId.make("thread-checkpoint-store-noprefix");
168
const fromCheckpointRef = checkpointRefForThreadTurn(threadId, 0);
@@ -170,6 +174,7 @@ it.layer(layerTest)("CheckpointStore.layer", (it) => {
174
checkpointRef: fromCheckpointRef,
175
});
176
yield* writeTextFile(NodePath.join(tmp, "README.md"), "# test\n\nafter\n");
177
+ yield* git(sub, ["commit", "--allow-empty", "-m", "moved"]);
178
yield* checkpointStore.captureCheckpoint({
179
cwd: tmp,
180
checkpointRef: toCheckpointRef,
@@ -184,6 +189,8 @@ it.layer(layerTest)("CheckpointStore.layer", (it) => {
189
190
expect(diff).toContain("diff --git a/README.md b/README.md");
191
expect(diff).toContain(" # test\n \n-before\n+after\n");
192
+ expect(diff).toContain("diff --git a/sub b/sub");
193
+ expect(diff).toContain("+Subproject commit ");
194
}),
195
);
196
apps/server/src/vcs/GitVcsDriver.ts
+1
@@ -1428,6 +1428,7 @@ export const makeVcsDriverShape = Effect.fn("makeGitVcsDriverShape")(function* (
1428
"--no-color",
1429
"--no-ext-diff",
1430
"--no-textconv",
1431
+ "--submodule=short",
1432
...PATCH_RENDER_PREFIX_ARGS,
1433
...(input.ignoreWhitespace ? ["--ignore-all-space"] : []),
1434
`${fromRevision}^{commit}`,
apps/server/src/vcs/GitVcsDriverCore.ts
+2
-1
@@ -81,7 +81,7 @@ const REVIEW_BRANCH_SUBJECT_LIMIT = 300;
81
const REVIEW_BRANCH_COMMIT_MAX_OUTPUT_BYTES = 128 * 1024;
82
// Client patch parsers require a/ and b/ prefixes; override user diff prefix settings.
83
export const PATCH_RENDER_PREFIX_ARGS = ["--src-prefix=a/", "--dst-prefix=b/"] as const;
84
-// Client patch parsers drop blank context lines that diff.suppressBlankEmpty prints without a space.
84
+// Client patch parsers drop blank context lines under diff.suppressBlankEmpty and summaries under diff.submodule.
85
const REVIEW_DIFF_ARGS = [
86
"-c",
87
"diff.suppressBlankEmpty=false",
@@ -90,6 +90,7 @@ const REVIEW_DIFF_ARGS = [
90
"--no-color",
91
"--no-ext-diff",
92
"--no-textconv",
93
+ "--submodule=short",
94
...PATCH_RENDER_PREFIX_ARGS,
95
];
96
const STATUS_UPSTREAM_REFRESH_INTERVAL = Duration.seconds(15);