mirror of
https://github.com/clearml/clearml-agent
synced 2025-01-31 09:06:52 +00:00
Fix git diff with empty line at the end of the git diff will cause corrupt diff apply message
This commit is contained in:
parent
6df0f81ca0
commit
52f30b306a
@ -382,7 +382,8 @@ class VCS(object):
|
||||
Run command with `input_` as stdin
|
||||
"""
|
||||
input_ = input_.encode("utf-8")
|
||||
if not input_.endswith(b"\n"):
|
||||
# always add extra empty line
|
||||
# (there is no downside, and it solves empty lines issue at end of patch cause corrupt message)
|
||||
input_ += b"\n"
|
||||
process = self._call_subprocess(
|
||||
subprocess.Popen,
|
||||
|
Loading…
Reference in New Issue
Block a user