Update apps/server/src/routes/worktree/routes/discard-changes.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
gsxdsm
2026-02-17 22:38:55 -08:00
committed by GitHub
parent cb99c4b4e8
commit 43c19c70ca

View File

@@ -128,7 +128,7 @@ export function createDiscardChangesHandler() {
stagedFiles.push(file.path);
}
// Check for working tree changes (worktree status Y): handles MM, AM, MD, etc.
if (workTreeStatus === 'M' || workTreeStatus === 'D' || workTreeStatus === 'A') {
if (workTreeStatus !== ' ' && workTreeStatus !== '?') {
trackedModified.push(file.path);
}
}