wfxr / forgit

:zzz: A utility tool powered by fzf for using git interactively.
MIT License
4.4k stars 137 forks source link

'gd' does not support git move/rename actions #188

Closed carlfriedrich closed 2 years ago

carlfriedrich commented 2 years ago

Check list

Environment info

Problem / Steps to reproduce

The forgit::diff function aka gd does not support git move or rename actions. Minimal reproducible example:

mkdir myrepo
cd myrepo
git init
echo "wow" > foo.txt
git add foo.txt
git commit -m "Commit 1"
git mv foo.txt bar.txt
echo "oh" > baz.txt
git add baz.txt

Calling gd --staged on this repo shows the following:

grafik

Obviously the output of git diff --name-status is not correctly parsed.

carlfriedrich commented 2 years ago

@wfxr I made PR #189 to fix this. Please let me know if it can be merged.