Skip to content

Commit 2f50609

Browse files
committed
update CLI scripts
1 parent 439851c commit 2f50609

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

src/cli/diffIndexGenerate.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ const HELP_TEXT: string = `Usage: acm [--cached] [--help|-h]
1111
Check Git changes and generate a commit message.
1212
1313
Options:
14-
--cached Use only staged changes (equivalent to git --cached).
15-
If the flag is omitted, then the standard \`git status\` logic is followed:
14+
--cached Use only staged changes (equivalent to \`git --cached\`).
15+
If the flag is omitted, then the standard \`git commit\` logic is followed:
1616
look for staged changes and use them, otherwise use unstaged changes.
1717
--help, -h Show this help and exit.`;
1818

src/cli/diffIndexGenerateCommit.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ const HELP_TEXT: string = `Usage: gacm [--cached] [--help|-h]
1111
Check Git changes, generate a commit message, and run Git commit.
1212
1313
Options:
14-
--cached Use only staged changes (equivalent to git --cached).
15-
If the flag is omitted, then the standard \`git status\` logic is followed:
14+
--cached Use only staged changes (equivalent to \`git --cached\`).
15+
If the flag is omitted, then the standard \`git commit\` logic is followed:
1616
look for staged changes and use them, otherwise use unstaged changes.
1717
--help, -h Show this help and exit.`;
1818

@@ -32,6 +32,7 @@ function main(argv: string[]): void {
3232

3333
const msg: string = generateCommitMessage(useCached);
3434

35+
// FIXME: there is a bug when using changes that are not staged and without --cached flag, so the message is unquoted.
3536
const commitArgs: string[] = ["commit", "--edit", "-m", msg, ...passthrough];
3637
execFileSync("git", commitArgs, { stdio: "inherit" });
3738
}

src/cli/generate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const HELP_TEXT: string = `Usage: auto_commit_msg_generate DIFF_INDEX_OUTPUT
1616
Generate a commit message from given input.
1717
1818
Arguments:
19-
DIFF_INDEX_OUTPUT Text output from 'git diff-index --name-status HEAD'.
19+
DIFF_INDEX_OUTPUT Text output from command like 'git diff-index --name-status HEAD'.
2020
2121
Options:
2222
--help, -h Show this help and exit.`;

0 commit comments

Comments
 (0)