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

[Fix] Check for staged files prior to spawning the prompt #818

Merged

Commits on Mar 25, 2021

  1. 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 commitizen#785"
    Ognjen Jevremovic committed Mar 25, 2021
    Copy the full SHA
    7e5e6da View commit details
    Browse the repository at this point in the history
  2. 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 commitizen#585"
    Ognjen Jevremovic committed Mar 25, 2021
    Copy the full SHA
    cce3176 View commit details
    Browse the repository at this point in the history

Commits on Mar 26, 2021

  1. 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 commitizen#785"
    Ognjen Jevremovic committed Mar 26, 2021
    Copy the full SHA
    1096f80 View commit details
    Browse the repository at this point in the history