mirror of
https://github.com/razzant/ouroboros.git
synced 2026-10-03 04:07:04 +00:00
fix: retain newline semantics through committed carrier export
This commit is contained in:
parent
ccaae88702
commit
568bf7f420
4 changed files with 19 additions and 4 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue