Skip to content

rename file got diff with change_type: R100#563

@Thrimbda

Description

@Thrimbda

when I renamed file A to B like this

$ git mv A B $ git status On branch master Changes to be committed: (use "git reset HEAD <file>..." to unstage) modified: .gitmodules renamed: A -> B modified: Cprogramming

but using gitpython in ipython3 I got this:

In [135]: repo.commit('HEAD~2').diff(repo.head.commit) Out[135]: [<git.diff.Diffat0x7fc52ab13730>, <git.diff.Diffat0x7fc529943c80>, <git.diff.Diffat0x7fc529943d90>, <git.diff.Diffat0x7fc52994ec80>] In [136]: repo.commit('HEAD~2').diff(repo.head.commit)[2].b_pathOut[136]: 'Cprogramming'In [137]: repo.commit('HEAD~2').diff(repo.head.commit)[1].b_pathOut[137]: 'B'In [138]: repo.commit('HEAD~2').diff(repo.head.commit)[1].change_typeOut[138]: 'R100'

is that normal or something went wrong?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions