{"thread":{"id":"16440","subject":"Not-quite-a-bug in pickaxe","startedAt":"2008-11-24T11:43:33Z","lastAt":"2008-11-24T17:36:45Z","messageCount":3,"participants":["Johannes Schindelin","Mikael Magnusson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"96413","messageId":"alpine.DEB.1.00.0811241238450.30769@pacific.mpi-cbg.de","threadId":"16440","inReplyTo":null,"subject":"Not-quite-a-bug in pickaxe","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-11-24T11:43:33Z","receivedAt":"2008-11-24T11:43:33Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi people,\n\nI do not know if I hit that behavior before, but now it hit me big time: \nif a commit moves a certain string from one place to another, \"git log \n-S<string>\" does not pick up that commit.  The code responsible for this \nis in diffcore-pickaxe.c:\n\n                        else if (!diff_unmodified_pair(p) &&\n                                 contains(p->one, needle, len, regexp) !=\n                                 contains(p->two, needle, len, regexp))\n                                has_changes++;\n\nBasically, the \"contains()\" method says how often the needle was found, \nand pickaxe just assumes that a move of a string is not interesting \nenough.\n\nNow, this behavior is probably intended, as searching files is much \ncheaper than generating the diffs between them, yet it is something you'll \nhave to keep in mind when using \"-S\".\n\nCiao,\nDscho\n"},{"id":"96418","messageId":"237967ef0811240708t58d48c84ud0626ba3aaed47b6@mail.gmail.com","threadId":"16440","inReplyTo":"alpine.DEB.1.00.0811241238450.30769@pacific.mpi-cbg.de","subject":"Re: Not-quite-a-bug in pickaxe","fromName":"Mikael Magnusson","fromEmail":"mikachu@gmail.com","sentAt":"2008-11-24T15:08:30Z","receivedAt":"2008-11-24T15:08:30Z","isPatch":false,"sender":{"key":"mikachu@gmail.com","avatar":null},"body":"2008/11/24 Johannes Schindelin <Johannes.Schindelin@gmx.de>:\n> Hi people,\n>\n> I do not know if I hit that behavior before,\n\nI'm pretty sure it has,\nhttp://thread.gmane.org/gmane.comp.version-control.git/100113/focus=100115\n(at least i think that's the same case?)\n\n> but now it hit me big time:\n> if a commit moves a certain string from one place to another, \"git log\n> -S<string>\" does not pick up that commit.  The code responsible for this\n> is in diffcore-pickaxe.c:\n>\n>                        else if (!diff_unmodified_pair(p) &&\n>                                 contains(p->one, needle, len, regexp) !=\n>                                 contains(p->two, needle, len, regexp))\n>                                has_changes++;\n>\n> Basically, the \"contains()\" method says how often the needle was found,\n> and pickaxe just assumes that a move of a string is not interesting\n> enough.\n>\n> Now, this behavior is probably intended, as searching files is much\n> cheaper than generating the diffs between them, yet it is something you'll\n> have to keep in mind when using \"-S\".\n\n-- \nMikael Magnusson\n"},{"id":"96429","messageId":"alpine.DEB.1.00.0811241836050.30769@pacific.mpi-cbg.de","threadId":"16440","inReplyTo":"237967ef0811240708t58d48c84ud0626ba3aaed47b6@mail.gmail.com","subject":"Re: Not-quite-a-bug in pickaxe","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-11-24T17:36:45Z","receivedAt":"2008-11-24T17:36:45Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 24 Nov 2008, Mikael Magnusson wrote:\n\n> 2008/11/24 Johannes Schindelin <Johannes.Schindelin@gmx.de>:\n>\n> > I do not know if I hit that behavior before,\n> \n> I'm pretty sure it has, \n> http://thread.gmane.org/gmane.comp.version-control.git/100113/focus=100115 \n> (at least i think that's the same case?)\n\nAh, I finally got around to read Junio's reply.  It did not stick back \nthen.\n\nThanks,\nDscho\n"}]}