Skip to content

Commit e92e07f

Browse files
committed
fix(commit): correct the stage checker before commiting
related to #418
1 parent 79b3156 commit e92e07f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

commitizen/git.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,8 @@ def find_git_project_root() -> Optional[Path]:
155155

156156
def is_staging_clean() -> bool:
157157
"""Check if staing is clean."""
158-
c = cmd.run("git diff --no-ext-diff --name-only")
159-
c_cached = cmd.run("git diff --no-ext-diff --cached --name-only")
160-
return not (bool(c.out) or bool(c_cached.out))
158+
c = cmd.run("git diff --no-ext-diff --cached --name-only")
159+
return not bool(c.out)
161160

162161

163162
def is_git_project() -> bool:

0 commit comments

Comments
 (0)