How to git diff files in renamed directories

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I want to diff a renamed file (to a different directory) in different commits.

File a was moved to the file subdir/c

I tried:

$ git diff b616d 0aa0 -- subdir/c a

but git seems to always diff against /dev/null:

diff --git a/a b/a
new file mode 100644
index 0000000..2e5ada8
--- /dev/null
+++ b/a
@@ -0,0 +1 @@
+File a
diff --git a/subdir/c b/subdir/c
deleted file mode 100644
index 24c846c..0000000
--- a/subdir/c
+++ /dev/null
@@ -1,2 +0,0 @@
-File b
-Another b change.

git log --follow subdir/c   recognizes that the file has been renamed
and moved to subdirectory.

Is there any way to get such a diff in git?

Regards,
Patrick
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]