Skip to content

Commit 0e08655

Browse files
committed
core: prevent external diff tools from interfering with snapshot generation
1 parent 427887d commit 0e08655

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/opencode/src/snapshot/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export namespace Snapshot {
4848
const git = gitdir()
4949
await $`git --git-dir ${git} --work-tree ${Instance.worktree} add .`.quiet().cwd(Instance.directory).nothrow()
5050
const result =
51-
await $`git -c core.autocrlf=false --git-dir ${git} --work-tree ${Instance.worktree} diff --name-only ${hash} -- .`
51+
await $`git -c core.autocrlf=false --git-dir ${git} --work-tree ${Instance.worktree} diff --no-ext-diff --name-only ${hash} -- .`
5252
.quiet()
5353
.cwd(Instance.directory)
5454
.nothrow()
@@ -126,7 +126,7 @@ export namespace Snapshot {
126126
const git = gitdir()
127127
await $`git --git-dir ${git} --work-tree ${Instance.worktree} add .`.quiet().cwd(Instance.directory).nothrow()
128128
const result =
129-
await $`git -c core.autocrlf=false --git-dir ${git} --work-tree ${Instance.worktree} diff ${hash} -- .`
129+
await $`git -c core.autocrlf=false --git-dir ${git} --work-tree ${Instance.worktree} diff --no-ext-diff ${hash} -- .`
130130
.quiet()
131131
.cwd(Instance.worktree)
132132
.nothrow()
@@ -159,7 +159,7 @@ export namespace Snapshot {
159159
export async function diffFull(from: string, to: string): Promise<FileDiff[]> {
160160
const git = gitdir()
161161
const result: FileDiff[] = []
162-
for await (const line of $`git -c core.autocrlf=false --git-dir ${git} --work-tree ${Instance.worktree} diff --no-renames --numstat ${from} ${to} -- .`
162+
for await (const line of $`git -c core.autocrlf=false --git-dir ${git} --work-tree ${Instance.worktree} diff --no-ext-diff --no-renames --numstat ${from} ${to} -- .`
163163
.quiet()
164164
.cwd(Instance.directory)
165165
.nothrow()

0 commit comments

Comments
 (0)