Commit f034664
authored
fix: add context lines to generated patch (#390)
Apparently, `git apply` uses context lines in the patch to find a match
for changed lines. Previously, we weren't adding context lines to keep
the patch size minimal.
As a bonus, `git apply` does not require being used in a git repository.
This means I can `git apply` any generated patch in the integration
tests about thread comments.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Improved the generated patch output so it may include more surrounding
context when applied.
* The test workflow now verifies that generated patches can be applied
successfully, helping catch issues earlier.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent 339337a commit f034664
2 files changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
196 | | - | |
| 195 | + | |
197 | 196 | | |
198 | 197 | | |
199 | 198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
325 | 333 | | |
326 | 334 | | |
327 | 335 | | |
| |||
0 commit comments