Skip to content

Commit 346909a

Browse files
committed
reorder git add for nested repos
1 parent 3465b57 commit 346909a

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

npm-app/src/checkpoints/file-manager.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,7 @@ export async function hasUnsavedChanges({
6262
],
6363
{ stdio: ['ignore', 'pipe', 'ignore'] }
6464
).toString()
65-
return (
66-
buildArray(output.split('\n').filter((line) => !line.startsWith(' M ')))
67-
.length > 0
68-
)
65+
return !!output
6966
} catch (error) {
7067
logger.error(
7168
{
@@ -288,6 +285,8 @@ async function gitAddAllIgnoringNestedRepos({
288285
const allNestedRepos: string[] = []
289286
try {
290287
while (true) {
288+
await gitAddAll({ projectDir, bareRepoPath, relativeFilepaths })
289+
291290
let output: string
292291
try {
293292
output = execFileSync(
@@ -318,8 +317,6 @@ async function gitAddAllIgnoringNestedRepos({
318317
.filter((line) => line[1] === 'M')
319318
.map((line) => line.slice(3).trim())
320319

321-
await gitAddAll({ projectDir, bareRepoPath, relativeFilepaths })
322-
323320
if (nestedRepos.length === 0) {
324321
break
325322
}

0 commit comments

Comments
 (0)