Skip to content

Commit

Permalink
Make git dirty message less verbose (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea authored Aug 21, 2024
1 parent 8b56a0b commit cb93768
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/tox_extra/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
from tox_extra.bindep import check_bindep

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


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

0 comments on commit cb93768

Please sign in to comment.