Skip to content

Commit 788caff

Browse files
committed
docs(CHANGES): Verbatim command output by default
why: Document the verbatim-output breaking change and the related output-fidelity fixes for downstream readers. what: - Add a Breaking changes entry for the verbatim-default `.run()` (with the trim=True migration) and Fixes for applyable diffs, byte-identical blobs, and intact multi-line error output.
1 parent 94436ff commit 788caff

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

CHANGES

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,31 @@ $ uv add libvcs --prerelease allow
2020
_Notes on the upcoming release will go here._
2121
<!-- END PLACEHOLDER - ADD NEW CHANGELOG ENTRIES BELOW THIS LINE -->
2222

23+
### Breaking changes
24+
25+
#### Command output is returned verbatim by default (#538)
26+
27+
`.run()` on {class}`~libvcs.cmd.git.Git`, {class}`~libvcs.cmd.hg.Hg`, and {class}`~libvcs.cmd.svn.Svn` no longer strips each line, drops blank lines, or removes the trailing newline — it returns the output unchanged.
28+
29+
Before, a bare value came back trimmed:
30+
31+
```python
32+
sha = git.run(["rev-parse", "HEAD"])
33+
```
34+
35+
After, output is verbatim; pass `trim=True` for the previous behavior:
36+
37+
```python
38+
sha = git.run(["rev-parse", "HEAD"], trim=True)
39+
```
40+
41+
High-level helpers are unaffected: {meth}`~libvcs.sync.git.GitSync.get_revision` still returns a bare revision.
42+
43+
### Fixes
44+
45+
- A captured `git diff` re-applies with `git apply` and `git cat-file blob` is byte-identical — leading indentation, blank lines, and the trailing newline are preserved instead of stripped (#538).
46+
- Multi-line stderr in {exc}`~libvcs.exc.CommandError` keeps its line breaks instead of being concatenated into one run-on line (#538).
47+
2348
## libvcs 0.43.0 (2026-06-20)
2449

2550
libvcs 0.43.0 restores compatibility with pytest 9.1. Because the pytest plugin is auto-loaded by pytest, the previous release aborted the test session for any project that had libvcs installed and upgraded to pytest 9.1+; that no longer happens. Downstream tools such as vcspull are the primary beneficiaries.

0 commit comments

Comments
 (0)