commit upgrade (#391)

This commit is contained in:
Will Chen
2025-06-11 15:42:10 -07:00
committed by GitHub
parent 007e0b2f22
commit 99e6592abc
3 changed files with 31 additions and 2 deletions

View File

@@ -74,7 +74,7 @@ export async function gitStageToRevert({
return;
}
// Safety: refuse to run if the work-tree isnt clean.
// Safety: refuse to run if the work-tree isn't clean.
const { stdout: wtStatus } = await execAsync(
`git -C "${path}" status --porcelain`,
);
@@ -138,3 +138,13 @@ export async function gitStageToRevert({
});
}
}
export async function gitAddAll({ path }: { path: string }): Promise<void> {
const settings = readSettings();
if (settings.enableNativeGit) {
await execAsync(`git -C "${path}" add .`);
return;
} else {
return git.add({ fs, dir: path, filepath: "." });
}
}