Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/utils/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ export async function getDiff(worktreePath: string): Promise<string> {
// Exclude node_modules symlink (created by createWorktree for tool access)
await exec("git", ["add", "-A"], { cwd: worktreePath });
// Unstage node_modules symlink if it got picked up (created by createWorktree)
await exec("git", ["reset", "HEAD", "--", "node_modules"], { cwd: worktreePath }).catch(() => {});
await exec("git", ["reset", "HEAD", "--", "node_modules"], { cwd: worktreePath }).catch(
() => {},
);
const { stdout } = await exec("git", ["diff", "--cached", "HEAD"], {
cwd: worktreePath,
});
Expand All @@ -99,7 +101,9 @@ export async function getDiffStats(
try {
await exec("git", ["add", "-A"], { cwd: worktreePath });
// Unstage node_modules symlink if it got picked up (created by createWorktree)
await exec("git", ["reset", "HEAD", "--", "node_modules"], { cwd: worktreePath }).catch(() => {});
await exec("git", ["reset", "HEAD", "--", "node_modules"], { cwd: worktreePath }).catch(
() => {},
);
const { stdout } = await exec("git", ["diff", "--cached", "--stat", "HEAD"], {
cwd: worktreePath,
});
Expand Down
Loading