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

3
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"cSpell.words": ["Resultium", "Acked", "johndoe", "outro", "rczrc"]
}

View File

@@ -1,14 +0,0 @@
{
"version": "0.2",
"ignorePaths": [],
"dictionaryDefinitions": [],
"dictionaries": [],
"words": [
"Acked",
"johndoe",
"outro",
"rczrc"
],
"ignoreWords": [],
"import": []
}

View File

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