Skip to content

Passing -a or --commit-all parameter doesn't commit all files #217

Open
@viljuska

Description

@viljuska

Describe the bug
There is an option to commit all tracked files on git by passing parameter -a or --commit-all, but it doesn't work. While inspecting the code, I noticed that in commit.js file when option commitAll is true, it passes empty string while it should either add dot (.) or -A to git commit.

Current behavior
It doesn't commit all files when passing option -a/--commit-all

Expected behavior
It should commit all files when passing option -a/--commit-all

Environment

  • commit-and-tag-version version(s): 12.5.0
  • Node/npm version: 22.12.0/10.9.0
  • OS: macOS 15.3.2

Possible Solution

I tried changing this line to add a dot (.) and it commited all files then:
await runExecFile(
args,
'git',
['commit'].concat(verify, sign, signoff, args.commitAll ? ['.'] : toAdd, [
'-m',
${formatCommitMessage(args.releaseCommitMessageFormat, newVersion)},
]),
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions