mirror of
https://github.com/clearml/clearml
synced 2025-04-25 16:59:46 +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:
|
if not repository_url:
|
||||||
raise DetectionError("No VCS environment data")
|
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(
|
return Result(
|
||||||
url=repository_url,
|
url=repository_url,
|
||||||
branch=VCS_BRANCH.get(),
|
branch=VCS_BRANCH.get(),
|
||||||
commit=VCS_COMMIT_ID.get(),
|
commit=VCS_COMMIT_ID.get(),
|
||||||
root=VCS_ROOT.get(converter=self._normalize_root),
|
root=VCS_ROOT.get(converter=self._normalize_root),
|
||||||
status=VCS_STATUS.get(),
|
status=status,
|
||||||
diff=VCS_DIFF.get(),
|
diff=diff,
|
||||||
|
modified=modified,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user