Not-quite-a-bug in pickaxe

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

 



Hi people,

I do not know if I hit that behavior before, but now it hit me big time: 
if a commit moves a certain string from one place to another, "git log 
-S<string>" does not pick up that commit.  The code responsible for this 
is in diffcore-pickaxe.c:

                        else if (!diff_unmodified_pair(p) &&
                                 contains(p->one, needle, len, regexp) !=
                                 contains(p->two, needle, len, regexp))
                                has_changes++;

Basically, the "contains()" method says how often the needle was found, 
and pickaxe just assumes that a move of a string is not interesting 
enough.

Now, this behavior is probably intended, as searching files is much 
cheaper than generating the diffs between them, yet it is something you'll 
have to keep in mind when using "-S".

Ciao,
Dscho

--
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]

  Powered by Linux