MCPcopy Create free account
hub / github.com/continuedev/continue / captureWorktreeDiff

Function captureWorktreeDiff

extensions/cli/src/commands/review/worktree.ts:81–95  ·  view source on GitHub ↗
(worktreePath: string)

Source from the content-addressed store, hash-verified

79 * Returns a unified diff patch string.
80 */
81export function captureWorktreeDiff(worktreePath: string): string {
82 try {
83 // Add all new files so they show up in the diff
84 execSync(`git -C "${worktreePath}" add -A`, {
85 stdio: ["pipe", "pipe", "pipe"],
86 });
87 return execSync(`git -C "${worktreePath}" diff --cached`, {
88 encoding: "utf-8",
89 maxBuffer: 10 * 1024 * 1024,
90 stdio: ["pipe", "pipe", "pipe"],
91 });
92 } catch {
93 return "";
94 }
95}
96
97/**
98 * Remove a git worktree.

Callers 1

runReviewWorkerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected