Contex
I'm trying to detect possible file rename that occurred after last commit, in a working copy. On my example, I have a clean working copy and I do that:
git mv old.txt new.txt
Running $ git status
shows the expected result:
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# renamed: old.txt -> new.txt
I tried
Using a StatusCommand
, I can see old.txt in the removed list, and new.txt in the added list.
But I can't find a way to link them together.
I'm aware of the existence of RenameDetector
, but it works using DiffEntry
, and I don't know how to get DiffEntries between HEAD and the Working Copy.