bmwill / diffy

Tools for finding and manipulating differences between files
Apache License 2.0
75 stars 22 forks source link

Is it possible to specify the file paths when creating a patch? #21

Open robenkleene opened 1 year ago

robenkleene commented 1 year ago

I'm creating a patch by comparing strings from two files, e.g., let patch = create_patch(&original, &modified); where original and modified are the contents of two separate files.

I'd like to use the file paths to those files in the patch output, e.g.:

--- a/<path-to-original>
+++ b/<path-to-modified>

But it looks like the filenames are being hard-coded as original and modified. Am I missing another way of specifying the paths to the files?