From e92e07f348a37056215a55c6ce686999d69f931b Mon Sep 17 00:00:00 2001 From: Xavier Moreno Date: Sat, 11 Sep 2021 17:36:33 +0200 Subject: [PATCH] fix(commit): correct the stage checker before commiting related to #418 --- commitizen/git.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/commitizen/git.py b/commitizen/git.py index 2904d6cb0..080c5a6cb 100644 --- a/commitizen/git.py +++ b/commitizen/git.py @@ -155,9 +155,8 @@ def find_git_project_root() -> Optional[Path]: def is_staging_clean() -> bool: """Check if staing is clean.""" - c = cmd.run("git diff --no-ext-diff --name-only") - c_cached = cmd.run("git diff --no-ext-diff --cached --name-only") - return not (bool(c.out) or bool(c_cached.out)) + c = cmd.run("git diff --no-ext-diff --cached --name-only") + return not bool(c.out) def is_git_project() -> bool: