git icdiff shows old filname for renamed files
calestyo opened this issue · 2 comments
calestyo commented
Hey.
When doing git icdiff
on a renamed file that has changes, it does actually show only the differences between the old and new file.
But on the right hand side, it again uses the old filename, though that has also changed.
Thanks,
Chris.
jeffkaufman commented
Trying to reproduce, I think git diff
does the same thing?
I think it's happening because your rename has already been staged, and so diffing just shows you the differences relative to what's staged.
calestyo commented
Hey.
I think it must be staged, because the git mv
stages that already, so the changes need to be staged as well.
I just tried it with a normal git diff
, but that seems to show the rename:
$ git status
On branch master
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
renamed: bla -> foo
$ git diff --staged
diff --git a/bla b/foo
similarity index 80%
rename from bla
rename to foo
index 9405325..e006065 100644
--- a/bla
+++ b/foo
@@ -1,5 +1,4 @@
a
b
-c
d
e
$ git icdiff --staged
bla bla
a a
b b
c
d d
e e
Thanks,
Chris.