fix: add context lines to generated patch#390
Conversation
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.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #390 +/- ##
==========================================
- Coverage 92.38% 92.38% -0.01%
==========================================
Files 23 23
Lines 3796 3795 -1
==========================================
- Hits 3507 3506 -1
Misses 289 289 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthrough
ChangesPatch context and test validation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Apparently,
git applyuses 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 applydoes not require being used in a git repository. This means I cangit applyany generated patch in the integration tests about thread comments.Summary by CodeRabbit