Bug?: 'git log --find-copies' doesn't match 'git log --follow <rev> -- path/to/file'
- From
- Alexander Pepper <pepper@inf.fu-berlin.de>
- Date
- Sep 30, 2011, 15:32 UTC
- Message-ID
- <DBC73B3F-2703-4651-AADA-233A9CC38AFD@inf.fu-berlin.de>
Hello Again.
I'm not really sure, if this is a bug or if I am missing something, but the following is quite annoying:
$ git version git version 1.7.6.3 $ git clone https://github.com/voldemort/voldemort.git $ cd voldemort $ git log --numstat --find-copies dd4e90f9 ... 3 15 contrib/ec2-testing/src/java/voldemort/utils/{StopClusterException.java => ClusterOperation.java} $ git log --numstat dd4e90f9 -- contrib/ec2-testing/src/java/voldemort/utils/ClusterOperation.java ... 23 0 contrib/ec2-testing/src/java/voldemort/utils/ClusterOperation.java $ git log --numstat --follow dd4e90f9 -- contrib/ec2-testing/src/java/voldemort/utils/ClusterOperation.java ... 6 10 src/java/voldemort/annotations/concurrency/Immutable.java => contrib/ec2-testing/src/java/voldemort/utils/ClusterOperation.java
So git log with copy and rename detection on (--find-copies) tells me, that the file StopClusterException.java is copied to ClusterOperation.java. But If I ask git log for that specific file with --follow git claims a copy from Immutable.java to ClusterOperation.java!
I understand, that git doesn't record renames and copies, but only detects it afterwords. But at least I would expect, that git detects the same thing consistently between to (quite) alike flags.
I also tried adding "--find-copies" and "--find-copies-harder" to 'git log --numstat --follow dd4e90f9', but they also result in claiming Immutable.java as the origin of the copy.
Is there a flag to get consistent results between the two or is this really a bug?
Greetings from Berlin Alex