diff options
author | Teddy Wing | 2020-07-25 17:02:09 +0200 |
---|---|---|
committer | Teddy Wing | 2020-07-25 17:02:09 +0200 |
commit | 7d894d9223ff05a2597011a898aa38760c16916f (patch) | |
tree | a5ddbb347ba38107b40b218953d188aa19ecd592 /src/bin | |
parent | c3d12c7edafa3b631a77432dd0fb6ce0d1ca21a0 (diff) | |
download | git-suggestion-7d894d9223ff05a2597011a898aa38760c16916f.tar.bz2 |
Suggestion: Add `apply_to` method
I didn't feel like writing a test for `Suggestion.apply()`, which writes
files, so decided to write a different version that used the original
file and a writer.
Changed the `Suggestion.suggestion()` function to not prepend "+" to
suggestion lines so we can use the function to extract the suggested
lines unmodified from the comment. Kept the old version around as
`suggestion_patch()` because we may need it to generate patches.
Copied the code from `Suggestion.apply()`, except write the changes to
`writer` instead of the file at `Suggestion.path`.
Diffstat (limited to 'src/bin')
0 files changed, 0 insertions, 0 deletions