fix: retain newline semantics through committed carrier export

This commit is contained in:
Ouroboros 2026-09-23 16:57:22 +03:00
parent ccaae88702
commit 568bf7f420
4 changed files with 19 additions and 4 deletions

View file

@ -476,7 +476,7 @@ def worktree_after_commit(clone: pathlib.Path) -> tuple[bool, str, list[str]]:
def _git_show(clone: pathlib.Path, rev: str, path: str) -> str:
"""The exact text of ``path`` at ``rev`` ('' when absent there)."""
proc = subprocess.run(["git", "show", f"{rev}:{path}"], cwd=str(clone), check=False, capture_output=True)
return proc.stdout.decode("utf-8") if proc.returncode == 0 else ""
return proc.stdout.decode("utf-8").replace("\r\n", "\n").replace("\r", "\n") if proc.returncode == 0 else ""
def release_carriers_desync_at(clone: pathlib.Path, rev: str) -> str: