Skip to content

Commit cb93768

Browse files
authored
Make git dirty message less verbose (#101)
1 parent 8b56a0b commit cb93768

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/tox_extra/hooks.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
from tox_extra.bindep import check_bindep
1515

1616
MSG_GIT_DIRTY = (
17-
"Git reported dirty status. "
18-
"Git should never report dirty status at the end of "
19-
"testing, regardless if status is passed, failed or aborted."
17+
"exit code 1 due to 'git status -s' reporting dirty. "
18+
"That should not happen regardless if status is passed, failed or aborted. "
19+
"Modify .gitignore file to avoid this."
2020
)
2121

2222

@@ -27,7 +27,7 @@ def is_git_dirty(path: str) -> bool:
2727
try:
2828
repo = git.Repo(os.getcwd())
2929
if repo.is_dirty(untracked_files=True):
30-
os.system("git status")
30+
os.system("git status -s")
3131
# We want to display long diff only on non-interactive shells,
3232
# like CI/CD pipelines because on local shell, the user can
3333
# decide to run it himself if the status line was not enogh.

0 commit comments

Comments
 (0)