Skip to content

repo.diff(c1, c2, flags=pygit2.GIT_DIFF_FIND_RENAMES) reverses diff #738

Closed
@jnareb

Description

@jnareb

First complaint is that there is no documentation and no examples of using flags (not flag as in description of parameters) with Repository.diff: http://www.pygit2.org/diff.html . Therefore I am not sure if I am using the API correctly.

Second, using flags=pygit2.GIT_DIFF_FIND_RENAMES for some reason reverses diff.

Compare

>>> repo = pygit2.Repository('path/to/repo')
>>> repo.diff('HEAD^', 'HEAD', flag=pygit2.GIT_DIFF_FIND_RENAMES).patch`

with

>>> repo.diff('HEAD^', 'HEAD').patch

pygit2.LIBGIT2_VERSION: '0.26.0'

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