Skip to content

Commit

Permalink
Updated to use maxsplit=1
Browse files Browse the repository at this point in the history
  • Loading branch information
MaitreyMishra committed Jan 14, 2025
1 parent 1ed9195 commit d5c6b5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion conan/tools/scm/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def is_dirty(self, repository=False):
return bool(status)
# Parse the status output, line by line, and match it with "_excluded"
lines = [line.strip() for line in status.splitlines()]
lines = [line.split()[1] for line in lines if line]
lines = [line.split(maxsplit=1)[1] for line in lines if line]
lines = [line for line in lines if not any(fnmatch.fnmatch(line, p) for p in self._excluded)]
self._conanfile.output.debug(f"Filtered git status: {lines}")
return bool(lines)
Expand Down

0 comments on commit d5c6b5a

Please sign in to comment.