mirror of
https://github.com/clearml/clearml
synced 2025-01-31 09:07:00 +00:00
Fix pycharm plugin support large git diff over OS environment
This commit is contained in:
parent
9c7e0747fb
commit
e655dd6cdf
@ -241,14 +241,19 @@ class EnvDetector(Detector):
|
||||
|
||||
if not repository_url:
|
||||
raise DetectionError("No VCS environment data")
|
||||
|
||||
status = VCS_STATUS.get() or ''
|
||||
diff = VCS_DIFF.get() or ''
|
||||
modified = bool(diff or (status and [s for s in status.split('\n') if s.strip().startswith('M ')]))
|
||||
if modified and not diff:
|
||||
diff = '# Repository modified, but no git diff could be extracted.'
|
||||
return Result(
|
||||
url=repository_url,
|
||||
branch=VCS_BRANCH.get(),
|
||||
commit=VCS_COMMIT_ID.get(),
|
||||
root=VCS_ROOT.get(converter=self._normalize_root),
|
||||
status=VCS_STATUS.get(),
|
||||
diff=VCS_DIFF.get(),
|
||||
status=status,
|
||||
diff=diff,
|
||||
modified=modified,
|
||||
)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user