feat: improve default 'stage all changes' behavior

This commit is contained in:
2023-12-09 19:38:01 +02:00
parent 4c892e8b11
commit a5626dbc54
3 changed files with 9 additions and 16 deletions

View File

@@ -45,7 +45,7 @@ const program = new Command();
program
.name("rcz")
.description("Resultium commit standardization command-line interface")
.version("1.4.0");
.version("1.5.0");
program
.command("commit")
@@ -69,7 +69,11 @@ program
? null
: await confirm({
message: "Stage all changes?",
initialValue: true,
initialValue: (
await simpleGit().diff(["--name-only", "--cached"])
).toString()
? false
: true,
});
if (isCancel(stageAll)) {