From a640d15a2cb1ea252b46914b0dcd33cfeda0cb40 Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Thu, 19 Feb 2026 10:21:57 -0800 Subject: [PATCH] Add --color=always to git diff commands --- src/cli.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cli.ts b/src/cli.ts index c23ead5..e691d07 100755 --- a/src/cli.ts +++ b/src/cli.ts @@ -335,15 +335,15 @@ program if (status.text().trim().length > 0) { // Show uncommitted changes (both staged and unstaged) - const result = await $`git -C ${session.worktree} diff HEAD`.nothrow() + const result = await $`git -C ${session.worktree} diff --color=always HEAD`.nothrow() if (result.exitCode !== 0) { // HEAD may not exist yet (no commits); fall back to showing all tracked + untracked - await $`git -C ${session.worktree} diff`.nothrow() + await $`git -C ${session.worktree} diff --color=always`.nothrow() } } else { // No uncommitted changes — show full branch diff vs main const main = await git.mainBranch(root) - const result = await $`git -C ${session.worktree} diff ${main}...${branch}`.nothrow() + const result = await $`git -C ${session.worktree} diff --color=always ${main}...${branch}`.nothrow() if (result.exitCode !== 0) { console.error("git diff failed") process.exit(1)