Skip to content

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

@robenkleene

Description

@robenkleene

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions