git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Bug?: 'git log --find-copies' doesn't match 'git log --follow <rev> -- path/to/file'
@ 2011-09-30 15:32 Alexander Pepper
  2011-09-30 21:38 ` Jeff King
  0 siblings, 1 reply; 4+ messages in thread
From: Alexander Pepper @ 2011-09-30 15:32 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-10-02 15:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-30 15:32 Bug?: 'git log --find-copies' doesn't match 'git log --follow <rev> -- path/to/file' Alexander Pepper
2011-09-30 21:38 ` Jeff King
2011-10-02 15:10   ` Alexander Pepper
2011-10-02 15:25     ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).