Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commitizen no longer reporting "No files added to staging!" warning in dirty stage #585

Closed
designorant opened this issue Oct 22, 2018 · 2 comments

Comments

@designorant
Copy link

Commitizen correctly errors if there are no staged files and no changes, but fails to throw an error with no staged files in dirty state.

v3.0.4

ognjenjevremovic pushed a commit to ognjenjevremovic/cz-cli that referenced this issue Mar 25, 2021
Extend upon the existing commit unit tests. Assert the error is thrown when running commitizen
commit command with no files add to staging.

"re commitizen#585"
LinusU pushed a commit that referenced this issue Nov 8, 2021
…pt (#818)

* fix(git-cz.js,staging.js): check for staged files before running prompt

Check for staged files before running the prompt. Running the `git-cz` command with no files staged
reports "No files added to staging". Preserve the functionality of `git -a` (--all) flag - `git-cz
-a` command with no files added to staging area, adds all files to staging and opens the prompt (no
error thrown).

"fix #785"

* test(tests/commit.js): throw error if staging is empty

Extend upon the existing commit unit tests. Assert the error is thrown when running commitizen
commit command with no files add to staging.

"re #585"

* test(tests/staging.js): preserve the functionality of the --all flag

Extend upon the existing staging unit tests. Assert that the files are added to staging area when
running commitizen commit command with -a (--all) flag, prior to spawning the prompt.

"re #785"
@dbofmmbt
Copy link

dbofmmbt commented Nov 9, 2021

It looks like #818 fixed it 🎉

@designorant
Copy link
Author

Haha, what a blast from the past! Thanks for the update @dbofmmbt!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants