Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
First of all, thanks a lot for writing diffy. I appreciate this this tool a lot!
I started using it and I miss the ability to specify the original and modified filename, and the ability to avoid outputting the "\ No newline at end of file" message, so here are two patches for that.
Note that I chose to add custom code rather than using the assert_patch! macro for the newline patch. Constructing a Patch from the representation obviously leads to a different content and it didn't seem worth the trouble to complicate the macro to handle a PatchFormatter and skip those tests when the option is set. I'm also not entirely happy with the
without_missing_newline_message
name, but didn't find anything better.For the custom file names, I didn't do anything with the
MergeOptions
as mentioned in your original issue, as it wasn't clear to me how file names would interact there.Let me know if there's any problem with those patches or if you'd like any change!