Skip to content

[RFE] Add patch method to pygit2.Patch returning patch diff string for an individual changed file #739

Closed
@jnareb

Description

@jnareb

The Diff class / type has patch method, which returns patch diff string, of all changes as whole. You can iterate over Diff and get Patch for each changed file. However Patch class does not have patch method, and there is currently no way to get patch diff string for an individual file.

GitPython has in its equivalent of per-file diff information, namely git.diff.Diff (equivalent of pygit2.Patch) method called diff, which returns patch diff string... but without diff headers.

P.S. Could we have some labels to easily distinguish bug reports from feature requests, and so on, please?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions