Skip to content

Commit 2cf02ce

Browse files
authored
get full list of changed files (#1411)
## Problem the "changed files" list does not include untracked files in a directory, e.g. if i create `/path/to/[a,b].tsx` then the list will show only `/path/to/` and clicking it does nothing <!-- Who is this for and what problem does it solve? --> <!-- Closes #ISSUE_ID --> ## Changes swaps `--untracked-files=normal` to `--untracked-files=all` for relevant diff queries <!-- What did you change and why? --> <!-- If there are frontend changes, include screenshots. --> ## How did you test this? <!-- Describe what you tested -- manual steps, automated tests, or both. --> <!-- If you're an agent, only list tests you actually ran. -->
1 parent 30302ef commit 2cf02ce

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/git/src/queries.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export async function getStatus(
143143
return manager.executeRead(
144144
baseDir,
145145
async (git) => {
146-
const status = await git.status(["--untracked-files=normal"]);
146+
const status = await git.status(["--untracked-files=all"]);
147147
return {
148148
isClean: status.isClean(),
149149
staged: status.staged,
@@ -339,7 +339,7 @@ export async function getChangedFiles(
339339
} catch {}
340340
}
341341

342-
const status = await git.status(["--untracked-files=normal"]);
342+
const status = await git.status(["--untracked-files=all"]);
343343
for (const file of [
344344
...status.modified,
345345
...status.created,
@@ -430,7 +430,7 @@ export async function getChangedFilesDetailed(
430430
try {
431431
const [diffSummary, status] = await Promise.all([
432432
git.diffSummary(["-M", "HEAD"]),
433-
git.status(["--untracked-files=normal"]),
433+
git.status(["--untracked-files=all"]),
434434
]);
435435

436436
const seenPaths = new Set<string>();

0 commit comments

Comments
 (0)