Closed
Description
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.Diff at 0x7fc52ab13730>,
<git.diff.Diff at 0x7fc529943c80>,
<git.diff.Diff at 0x7fc529943d90>,
<git.diff.Diff at 0x7fc52994ec80>]
In [136]: repo.commit('HEAD~2').diff(repo.head.commit)[2].b_path
Out[136]: 'Cprogramming'
In [137]: repo.commit('HEAD~2').diff(repo.head.commit)[1].b_path
Out[137]: 'B'
In [138]: repo.commit('HEAD~2').diff(repo.head.commit)[1].change_type
Out[138]: 'R100'
is that normal or something went wrong?