{"thread":{"id":"30744","subject":"[PATCH] gitk: add support for -G'regex' pickaxe variant","startedAt":"2012-06-08T02:32:22Z","lastAt":"2013-05-13T21:52:42Z","messageCount":20,"participants":["Martin Langhoff","Zbigniew Jędrzejewski-Szmek","Junio C Hamano","Paul Mackerras","Felipe Contreras","Jonathan Nieder","Ramkumar Ramachandra"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"193121","messageId":"1339122742-28677-1-git-send-email-martin@laptop.org","threadId":"30744","inReplyTo":null,"subject":"[PATCH] gitk: add support for -G'regex' pickaxe variant","fromName":"Martin Langhoff","fromEmail":"martin@laptop.org","sentAt":"2012-06-08T02:32:22Z","receivedAt":"2012-06-08T02:32:22Z","isPatch":true,"sender":{"key":"martin@laptop.org","avatar":null},"body":"git log -G'regex' is a very usable alternative to the classic\npickaxe. Minimal patch to make it usable from gitk.\n---\n gitk-git/gitk |    5 ++++-\n 1 files changed, 4 insertions(+), 1 deletions(-)\n\ndiff --git a/gitk-git/gitk b/gitk-git/gitk\nindex 22270ce..876b8f9 100755\n--- a/gitk-git/gitk\n+++ b/gitk-git/gitk\n@@ -2232,7 +2232,8 @@ proc makewindow {} {\n     set gm [makedroplist .tf.lbar.gdttype gdttype \\\n \t\t[mc \"containing:\"] \\\n \t\t[mc \"touching paths:\"] \\\n-\t\t[mc \"adding/removing string:\"]]\n+\t\t[mc \"adding/removing string:\"] \\\n+\t\t[mc \"changes match regex:\"]]\n     trace add variable gdttype write gdttype_change\n     pack .tf.lbar.gdttype -side left -fill y\n \n@@ -4595,6 +4596,8 @@ proc do_file_hl {serial} {\n \tset gdtargs [concat -- $relative_paths]\n     } elseif {$gdttype eq [mc \"adding/removing string:\"]} {\n \tset gdtargs [list \"-S$highlight_files\"]\n+    } elseif {$gdttype eq [mc \"changes match regex:\"]} {\n+\tset gdtargs [list \"-G$highlight_files\"]\n     } else {\n \t# must be \"containing:\", i.e. we're searching commit info\n \treturn\n-- \n1.7.7.6\n"},{"id":"193205","messageId":"4FD31476.90104@in.waw.pl","threadId":"30744","inReplyTo":"1339122742-28677-1-git-send-email-martin@laptop.org","subject":"Re: [PATCH] gitk: add support for -G'regex' pickaxe variant","fromName":"Zbigniew Jędrzejewski-Szmek","fromEmail":"zbyszek@in.waw.pl","sentAt":"2012-06-09T09:16:38Z","receivedAt":"2012-06-09T09:16:38Z","isPatch":true,"sender":{"key":"zbyszek@in.waw.pl","avatar":"https://avatars.githubusercontent.com/u/349618?v=4"},"body":"On 06/08/2012 04:32 AM, Martin Langhoff wrote:\n> git log -G'regex' is a very usable alternative to the classic\n> pickaxe. Minimal patch to make it usable from gitk.\n\n>      set gm [makedroplist .tf.lbar.gdttype gdttype \\\n>  \t\t[mc \"containing:\"] \\\n>  \t\t[mc \"touching paths:\"] \\\n> -\t\t[mc \"adding/removing string:\"]]\n> +\t\t[mc \"adding/removing string:\"] \\\n> +\t\t[mc \"changes match regex:\"]]\n\nHi,\n\nthis feature is definitely useful. One nitpick: the string that you add\nbecomes part of a sentence in the GUI: \"prev/next commit changes match\nregex\", which is in different grammatical form then the existing\nsnippets. Should be something with '-ing'.\n\nZbyszek\n"},{"id":"193225","messageId":"7v8vfvbrjt.fsf@alter.siamese.dyndns.org","threadId":"30744","inReplyTo":"4FD31476.90104@in.waw.pl","subject":"Re: [PATCH] gitk: add support for -G'regex' pickaxe variant","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-06-10T06:37:58Z","receivedAt":"2012-06-10T06:37:58Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> writes:\n\n> On 06/08/2012 04:32 AM, Martin Langhoff wrote:\n>> git log -G'regex' is a very usable alternative to the classic\n>> pickaxe. Minimal patch to make it usable from gitk.\n>\n>>      set gm [makedroplist .tf.lbar.gdttype gdttype \\\n>>  \t\t[mc \"containing:\"] \\\n>>  \t\t[mc \"touching paths:\"] \\\n>> -\t\t[mc \"adding/removing string:\"]]\n>> +\t\t[mc \"adding/removing string:\"] \\\n>> +\t\t[mc \"changes match regex:\"]]\n>\n> Hi,\n>\n> this feature is definitely useful. One nitpick: the string that you add\n> becomes part of a sentence in the GUI: \"prev/next commit changes match\n> regex\", which is in different grammatical form then the existing\n> snippets. Should be something with '-ing'.\n\n\"prev/next commit with changes matching regex\" perhaps?\n\nIn any case, Paul needs to be in the loop when we discuss gitk\nchanges.\n"},{"id":"193230","messageId":"20120610072431.GA20320@bloggs.ozlabs.ibm.com","threadId":"30744","inReplyTo":"7v8vfvbrjt.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] gitk: add support for -G'regex' pickaxe variant","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2012-06-10T07:24:31Z","receivedAt":"2012-06-10T07:24:31Z","isPatch":true,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"On Sat, Jun 09, 2012 at 11:37:58PM -0700, Junio C Hamano wrote:\n> Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> writes:\n> \n> > On 06/08/2012 04:32 AM, Martin Langhoff wrote:\n> >> git log -G'regex' is a very usable alternative to the classic\n> >> pickaxe. Minimal patch to make it usable from gitk.\n> >\n> >>      set gm [makedroplist .tf.lbar.gdttype gdttype \\\n> >>  \t\t[mc \"containing:\"] \\\n> >>  \t\t[mc \"touching paths:\"] \\\n> >> -\t\t[mc \"adding/removing string:\"]]\n> >> +\t\t[mc \"adding/removing string:\"] \\\n> >> +\t\t[mc \"changes match regex:\"]]\n> >\n> > Hi,\n> >\n> > this feature is definitely useful. One nitpick: the string that you add\n> > becomes part of a sentence in the GUI: \"prev/next commit changes match\n> > regex\", which is in different grammatical form then the existing\n> > snippets. Should be something with '-ing'.\n> \n> \"prev/next commit with changes matching regex\" perhaps?\n\nThere is already the drop-down list to select exact, case-ignoring or\nregexp matching.  I would think that \"adding/removing string\" combined\nwith \"Regexp\" matching should select this.\n\nWhat exactly does git log -G do?\n\nPaul.\n"},{"id":"193232","messageId":"7vipezaaig.fsf@alter.siamese.dyndns.org","threadId":"30744","inReplyTo":"20120610072431.GA20320@bloggs.ozlabs.ibm.com","subject":"Re: [PATCH] gitk: add support for -G'regex' pickaxe variant","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-06-10T07:31:19Z","receivedAt":"2012-06-10T07:31:19Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Paul Mackerras <paulus@samba.org> writes:\n\n> What exactly does git log -G do?\n\nUnlike\n\n    git log -S'this\n    and\n    that\n    line'\n\nwhich finds commits that changes the number of occurrences of the\ngiven lines in the blob (typically 1 to 0 or 0 to 1),\n\n    git log -G'frotz'\n\ninternally runs \"git log -U0\", and finds commits that adds or\nremoves a line that matches the given pattern 'frotz'.\n"},{"id":"193669","messageId":"1339698851-15428-1-git-send-email-zbyszek@in.waw.pl","threadId":"30744","inReplyTo":"7vipezaaig.fsf@alter.siamese.dyndns.org","subject":"[PATCH] gitk: add support for -G'regex' pickaxe variant","fromName":"Zbigniew Jędrzejewski-Szmek","fromEmail":"zbyszek@in.waw.pl","sentAt":"2012-06-14T18:34:11Z","receivedAt":"2012-06-14T18:34:11Z","isPatch":true,"sender":{"key":"zbyszek@in.waw.pl","avatar":"https://avatars.githubusercontent.com/u/349618?v=4"},"body":"From: Martin Langhoff <martin@laptop.org>\n\ngit log -G'regex' is a very usable alternative to the classic\npickaxe. Minimal patch to make it usable from gitk.\n\n[zj: reword message]\nSigned-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>\n---\nMartin's off on holidays, so I'm sending v2 after rewording.\n\n gitk-git/gitk | 5 ++++-\n 1 file changed, 4 insertions(+), 1 deletion(-)\n\ndiff --git a/gitk-git/gitk b/gitk-git/gitk\nindex 22270ce..24eaead 100755\n--- a/gitk-git/gitk\n+++ b/gitk-git/gitk\n@@ -2232,7 +2232,8 @@ proc makewindow {} {\n     set gm [makedroplist .tf.lbar.gdttype gdttype \\\n \t\t[mc \"containing:\"] \\\n \t\t[mc \"touching paths:\"] \\\n-\t\t[mc \"adding/removing string:\"]]\n+\t\t[mc \"adding/removing string:\"] \\\n+\t\t[mc \"with changes matching regex:\"]]\n     trace add variable gdttype write gdttype_change\n     pack .tf.lbar.gdttype -side left -fill y\n \n@@ -4595,6 +4596,8 @@ proc do_file_hl {serial} {\n \tset gdtargs [concat -- $relative_paths]\n     } elseif {$gdttype eq [mc \"adding/removing string:\"]} {\n \tset gdtargs [list \"-S$highlight_files\"]\n+    } elseif {$gdttype eq [mc \"with changes matching regex:\"]} {\n+\tset gdtargs [list \"-G$highlight_files\"]\n     } else {\n \t# must be \"containing:\", i.e. we're searching commit info\n \treturn\n-- \n1.7.11.rc3.129.ga90bc7a.dirty\n"},{"id":"216629","messageId":"CACPiFCKev9uibTa8GSH94ZaH-NaVBAWVempg4xfTdFTThE85Zw@mail.gmail.com","threadId":"30744","inReplyTo":"1339698851-15428-1-git-send-email-zbyszek@in.waw.pl","subject":"Re: [PATCH] gitk: add support for -G'regex' pickaxe variant","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2013-05-07T17:17:18Z","receivedAt":"2013-05-07T17:17:18Z","isPatch":true,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"I just did git rebase origin/master for the umpteenth time, which\nreminded me this nice patch is still pending.\n\nping?\n\n\n\nm\n\nOn Thu, Jun 14, 2012 at 2:34 PM, Zbigniew Jędrzejewski-Szmek\n<zbyszek@in.waw.pl> wrote:\n> From: Martin Langhoff <martin@laptop.org>\n>\n> git log -G'regex' is a very usable alternative to the classic\n> pickaxe. Minimal patch to make it usable from gitk.\n>\n> [zj: reword message]\n> Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>\n> ---\n> Martin's off on holidays, so I'm sending v2 after rewording.\n>\n>  gitk-git/gitk | 5 ++++-\n>  1 file changed, 4 insertions(+), 1 deletion(-)\n>\n> diff --git a/gitk-git/gitk b/gitk-git/gitk\n> index 22270ce..24eaead 100755\n> --- a/gitk-git/gitk\n> +++ b/gitk-git/gitk\n> @@ -2232,7 +2232,8 @@ proc makewindow {} {\n>      set gm [makedroplist .tf.lbar.gdttype gdttype \\\n>                 [mc \"containing:\"] \\\n>                 [mc \"touching paths:\"] \\\n> -               [mc \"adding/removing string:\"]]\n> +               [mc \"adding/removing string:\"] \\\n> +               [mc \"with changes matching regex:\"]]\n>      trace add variable gdttype write gdttype_change\n>      pack .tf.lbar.gdttype -side left -fill y\n>\n> @@ -4595,6 +4596,8 @@ proc do_file_hl {serial} {\n>         set gdtargs [concat -- $relative_paths]\n>      } elseif {$gdttype eq [mc \"adding/removing string:\"]} {\n>         set gdtargs [list \"-S$highlight_files\"]\n> +    } elseif {$gdttype eq [mc \"with changes matching regex:\"]} {\n> +       set gdtargs [list \"-G$highlight_files\"]\n>      } else {\n>         # must be \"containing:\", i.e. we're searching commit info\n>         return\n> --\n> 1.7.11.rc3.129.ga90bc7a.dirty\n>\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n\n\n\n-- \n martin.langhoff@gmail.com\n -  ask interesting questions\n - don't get distracted with shiny stuff  - working code first\n ~ http://docs.moodle.org/en/User:Martin_Langhoff\n"},{"id":"216638","messageId":"CAMP44s3d6dY8F-z8EA2jn+BrA0rMCGzGcm9a=41UTWsq=PwUGw@mail.gmail.com","threadId":"30744","inReplyTo":"CACPiFCKev9uibTa8GSH94ZaH-NaVBAWVempg4xfTdFTThE85Zw@mail.gmail.com","subject":"Re: [PATCH] gitk: add support for -G'regex' pickaxe variant","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-05-07T20:30:27Z","receivedAt":"2013-05-07T20:30:27Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Tue, May 7, 2013 at 12:17 PM, Martin Langhoff\n<martin.langhoff@gmail.com> wrote:\n> I just did git rebase origin/master for the umpteenth time, which\n> reminded me this nice patch is still pending.\n>\n> ping?\n\nFor some reason getting patches into gitk takes a long long looong time.\n\n-- \nFelipe Contreras\n"},{"id":"216961","messageId":"20130511055647.GA3262@iris.ozlabs.ibm.com","threadId":"30744","inReplyTo":"CACPiFCKev9uibTa8GSH94ZaH-NaVBAWVempg4xfTdFTThE85Zw@mail.gmail.com","subject":"Re: [PATCH] gitk: add support for -G'regex' pickaxe variant","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2013-05-11T05:56:47Z","receivedAt":"2013-05-11T05:56:47Z","isPatch":true,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"On Tue, May 07, 2013 at 01:17:18PM -0400, Martin Langhoff wrote:\n> I just did git rebase origin/master for the umpteenth time, which\n> reminded me this nice patch is still pending.\n> \n> ping?\n\nI thought I had replied to this patch; maybe I only thought about it.\n\nGiven that we already have a selector to choose between exact and\nregexp matching, it seems more natural to use that rather than add a\nnew selector entry.  Arguably the \"IgnCase\" option should be disabled\nwhen \"adding/removing string\" is selected.\n\nPaul.\n"},{"id":"216963","messageId":"20130511061322.GB3394@elie","threadId":"30744","inReplyTo":"20130511055647.GA3262@iris.ozlabs.ibm.com","subject":"Re: [PATCH] gitk: add support for -G'regex' pickaxe variant","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-05-11T06:13:22Z","receivedAt":"2013-05-11T06:13:22Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Paul Mackerras wrote:\n\n> I thought I had replied to this patch; maybe I only thought about it.\n>\n> Given that we already have a selector to choose between exact and\n> regexp matching, it seems more natural to use that rather than add a\n> new selector entry.  Arguably the \"IgnCase\" option should be disabled\n> when \"adding/removing string\" is selected.\n\nThanks.  I think I disagree: \"log -G\" and \"log -S\" are different\noperations, not variations on the same one.  \n\nThe description \"Find next commit adding/removing string:\" very\nclearly conveys what \"-S\" means.  Maybe -G would be more clearly\ndescribed as \"Find next commit changing line that matches regex:\" or\n\"Find next commit changing line containing:\"?\n\nJonathan\n"},{"id":"216981","messageId":"20130511094119.GA6196@iris.ozlabs.ibm.com","threadId":"30744","inReplyTo":"20130511061322.GB3394@elie","subject":"Re: [PATCH] gitk: add support for -G'regex' pickaxe variant","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2013-05-11T09:41:19Z","receivedAt":"2013-05-11T09:41:19Z","isPatch":true,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"On Fri, May 10, 2013 at 11:13:22PM -0700, Jonathan Nieder wrote:\n> Paul Mackerras wrote:\n> \n> > I thought I had replied to this patch; maybe I only thought about it.\n> >\n> > Given that we already have a selector to choose between exact and\n> > regexp matching, it seems more natural to use that rather than add a\n> > new selector entry.  Arguably the \"IgnCase\" option should be disabled\n> > when \"adding/removing string\" is selected.\n> \n> Thanks.  I think I disagree: \"log -G\" and \"log -S\" are different\n> operations, not variations on the same one.  \n\nOK, fair enough, and I see there is in fact a --pickaxe-regex we\ncould use.\n\n> The description \"Find next commit adding/removing string:\" very\n> clearly conveys what \"-S\" means.  Maybe -G would be more clearly\n> described as \"Find next commit changing line that matches regex:\" or\n> \"Find next commit changing line containing:\"?\n\nHow about \"changing lines matching:\"?  If it gets too long it will\ntake up too much horizontal room.\n\nPaul.\n"},{"id":"217205","messageId":"CACPiFCKkzSCaSfqExZggFHBAmcPBTYYhyauOa2h1dXiYqKZMxA@mail.gmail.com","threadId":"30744","inReplyTo":"20130511094119.GA6196@iris.ozlabs.ibm.com","subject":"Re: [PATCH] gitk: add support for -G'regex' pickaxe variant","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2013-05-13T16:22:57Z","receivedAt":"2013-05-13T16:22:57Z","isPatch":true,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"On Sat, May 11, 2013 at 5:41 AM, Paul Mackerras <paulus@samba.org> wrote:\n> On Fri, May 10, 2013 at 11:13:22PM -0700, Jonathan Nieder wrote:\n>> Paul Mackerras wrote:\n>>\n>> > I thought I had replied to this patch; maybe I only thought about it.\n>> >\n>> > Given that we already have a selector to choose between exact and\n>> > regexp matching, it seems more natural to use that rather than add a\n>> > new selector entry.  Arguably the \"IgnCase\" option should be disabled\n>> > when \"adding/removing string\" is selected.\n>>\n>> Thanks.  I think I disagree: \"log -G\" and \"log -S\" are different\n>> operations, not variations on the same one.\n>\n> OK, fair enough, and I see there is in fact a --pickaxe-regex we\n> could use.\n\nAnd to be honest, log -G is so much more useful that I don't care a\ns***t for log -S.\n\nEssentially, to use log -S you need to know that the string the change\nyou are looking for changed all together. That's a high threshold of\nknowledge to meet before you find something; you essentially have to\nknow what you are looking for pretty well!\n\nIn other words: You find a suspicious-looking line of code and you ask\n\"how did this horrid code come to be?\", and the more horrendous the\ncode is, the more likely it is to be the accretion of a several\ncommits. In that case, which to me is the common case, log -S ain't\nyour friend at all.\n\ncheers,\n\n\n\n\nm\n"},{"id":"217218","messageId":"20130513185232.GA3657@google.com","threadId":"30744","inReplyTo":"20130511094119.GA6196@iris.ozlabs.ibm.com","subject":"Re: [PATCH] gitk: add support for -G'regex' pickaxe variant","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-05-13T18:52:32Z","receivedAt":"2013-05-13T18:52:32Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Paul Mackerras wrote:\n\n> How about \"changing lines matching:\"?\n\nSorry for the slow response.  Sounds perfect.\n\nThanks,\nJonathan\n"},{"id":"217219","messageId":"20130513185551.GB3657@google.com","threadId":"30744","inReplyTo":"CACPiFCKkzSCaSfqExZggFHBAmcPBTYYhyauOa2h1dXiYqKZMxA@mail.gmail.com","subject":"Re: [PATCH] gitk: add support for -G'regex' pickaxe variant","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-05-13T18:55:51Z","receivedAt":"2013-05-13T18:55:51Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Martin Langhoff wrote:\n\n> And to be honest, log -G is so much more useful that I don't care a\n> s***t for log -S.\n\nFair enough. :)\n\n[...]\n> In other words: You find a suspicious-looking line of code and you ask\n> \"how did this horrid code come to be?\", and the more horrendous the\n> code is, the more likely it is to be the accretion of a several\n> commits. In that case, which to me is the common case, log -S ain't\n> your friend at all.\n\nMy experience is the opposite.  I wonder \"What did the author of this\nnonsense comment mean?\" or \"What is the purpose of this strange\ncondition in this if () statement?\".  Then \"git log -S\" finds the\nculprit without showing extraneous unrelated changes (such as\nreindenting).  It is like \"git blame\", but for arbitrary chunks of\ncode instead of single lines.  Then, just like with \"git blame\", at\ntimes the next step is to blame the parent and repeat the process\nusing the earlier form of the code in question.\n\nIt is especially handy for confusing code that spans multiple lines.\n(Unfortunately that is not as easy to try in gitk.)\n\nAs I mentioned before, log -G and log -S are fairly dissimilar\noperations.\n\nThanks,\nJonathan\n"},{"id":"217222","messageId":"CAAhxitGFhVa6+8x_rgNz5dgyr6m4S11fVU2eJNnMuWimGiM8aQ@mail.gmail.com","threadId":"30744","inReplyTo":"20130513185551.GB3657@google.com","subject":"Re: [PATCH] gitk: add support for -G'regex' pickaxe variant","fromName":"Martin Langhoff","fromEmail":"martin@laptop.org","sentAt":"2013-05-13T19:19:09Z","receivedAt":"2013-05-13T19:19:09Z","isPatch":true,"sender":{"key":"martin@laptop.org","avatar":null},"body":"On Mon, May 13, 2013 at 2:55 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:\n> My experience is the opposite.  I wonder \"What did the author of this\n> nonsense comment mean?\" or \"What is the purpose of this strange\n> condition in this if () statement?\".  Then \"git log -S\" finds the\n> culprit\n\nOnly if that if () statement looks that way from a single commit.\nThat's my point. If the line code bit you are looking at is the result\nof several changes, your log -S will grind a while and find you\nnothing.\n\ncheers,\n\n\n\nm\n--\n martin@laptop.org\n - ask interesting questions\n - don't get distracted with shiny stuff  - working code first\n - http://wiki.laptop.org/go/User:Martinlanghoff\n"},{"id":"217225","messageId":"20130513193320.GC3657@google.com","threadId":"30744","inReplyTo":"CAAhxitGFhVa6+8x_rgNz5dgyr6m4S11fVU2eJNnMuWimGiM8aQ@mail.gmail.com","subject":"Re: [PATCH] gitk: add support for -G'regex' pickaxe variant","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-05-13T19:33:20Z","receivedAt":"2013-05-13T19:33:20Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Martin Langhoff wrote:\n> On Mon, May 13, 2013 at 2:55 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:\n\n>> My experience is the opposite.  I wonder \"What did the author of this\n>> nonsense comment mean?\" or \"What is the purpose of this strange\n>> condition in this if () statement?\".  Then \"git log -S\" finds the\n>> culprit\n>\n> Only if that if () statement looks that way from a single commit.\n> That's my point. If the line code bit you are looking at is the result\n> of several changes, your log -S will grind a while and find you\n> nothing.\n\nWell, no, it should find the final change that brought it into the\ncurrent form.  Just like \"git blame\".\n\nHas it been finding zero results in some cases where the current code\nmatches the pattern?  That sounds like a bug.\n"},{"id":"217231","messageId":"CACPiFC+Ummjj4d7OiZwEW+Xm_uRNU1hre3_6UDKUBTepm7EmqA@mail.gmail.com","threadId":"30744","inReplyTo":"20130513193320.GC3657@google.com","subject":"Re: [PATCH] gitk: add support for -G'regex' pickaxe variant","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2013-05-13T20:54:11Z","receivedAt":"2013-05-13T20:54:11Z","isPatch":true,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"On Mon, May 13, 2013 at 3:33 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:\n> Well, no, it should find the final change that brought it into the\n> current form.  Just like \"git blame\".\n>\n> Has it been finding zero results in some cases where the current code\n> matches the pattern?  That sounds like a bug.\n\nUmmm, maybe. You are right, with current git it does work as I would\nexpect (usefully ;-) ).\n\nI know I struggled quite a bit with log -S not finding stuff I thought\nit should and that log -G did find, back a year ago.\n\nDamn, I don't have a precise record of what git it was on, nor a good\nrepro example. Too long ago,\n\n\n\nm\n--\n martin.langhoff@gmail.com\n -  ask interesting questions\n - don't get distracted with shiny stuff  - working code first\n ~ http://docs.moodle.org/en/User:Martin_Langhoff\n"},{"id":"217232","messageId":"CALkWK0kVa-9-G8-2HtH1_cd1LY65abU8R4WKcjgkyTSh=xQamw@mail.gmail.com","threadId":"30744","inReplyTo":"20130513193320.GC3657@google.com","subject":"Re: [PATCH] gitk: add support for -G'regex' pickaxe variant","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-05-13T21:04:20Z","receivedAt":"2013-05-13T21:04:20Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Jonathan Nieder wrote:\n> Martin Langhoff wrote:\n>> On Mon, May 13, 2013 at 2:55 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:\n>\n>>> My experience is the opposite.  I wonder \"What did the author of this\n>>> nonsense comment mean?\" or \"What is the purpose of this strange\n>>> condition in this if () statement?\".  Then \"git log -S\" finds the\n>>> culprit\n>>\n>> Only if that if () statement looks that way from a single commit.\n>> That's my point. If the line code bit you are looking at is the result\n>> of several changes, your log -S will grind a while and find you\n>> nothing.\n>\n> Well, no, it should find the final change that brought it into the\n> current form.  Just like \"git blame\".\n\nI still don't know exactly what -G and -S do.  The documentation can\nbe improved, no?  A nice example would definitely help.\n\nThanks.\n"},{"id":"217241","messageId":"20130513213822.GH3657@google.com","threadId":"30744","inReplyTo":"CALkWK0kVa-9-G8-2HtH1_cd1LY65abU8R4WKcjgkyTSh=xQamw@mail.gmail.com","subject":"Re: [PATCH] gitk: add support for -G'regex' pickaxe variant","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-05-13T21:38:22Z","receivedAt":"2013-05-13T21:38:22Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Ramkumar Ramachandra wrote:\n\n> I still don't know exactly what -G and -S do.\n\nIf you've been following recent gitk development (or this thread)\nclosely, you'll know that \"git log -S\" finds commits adding/removing a\nstring, while \"git log -G\" finds commits changing lines matching a\nregex.\n\nExamples for inclusion in the documentation welcome, certainly\n(especially if they come in patch form).\n\nA quick web search finds some references:\n\n http://article.gmane.org/gmane.comp.version-control.git/187364\n http://thread.gmane.org/gmane.comp.version-control.git/154822/focus=154823\n http://gitster.livejournal.com/35628.html\n http://thread.gmane.org/gmane.comp.lang.scala.internals/14219/focus=14220\n http://thread.gmane.org/gmane.linux.kernel/1370389/focus=1370478\n http://thread.gmane.org/gmane.comp.sysutils.autoconf.general/10682/focus=5691\n http://thread.gmane.org/gmane.network.nagios.plugins.devel/6164/focus=6175\n http://thread.gmane.org/gmane.comp.python.sympy/5830/focus=5836\n\nThanks and hope that helps,\nJonathan\n"},{"id":"217242","messageId":"7vobcelf85.fsf@alter.siamese.dyndns.org","threadId":"30744","inReplyTo":"CACPiFC+Ummjj4d7OiZwEW+Xm_uRNU1hre3_6UDKUBTepm7EmqA@mail.gmail.com","subject":"Re: [PATCH] gitk: add support for -G'regex' pickaxe variant","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-05-13T21:52:42Z","receivedAt":"2013-05-13T21:52:42Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Martin Langhoff <martin.langhoff@gmail.com> writes:\n\n> On Mon, May 13, 2013 at 3:33 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:\n>> Well, no, it should find the final change that brought it into the\n>> current form.  Just like \"git blame\".\n>>\n>> Has it been finding zero results in some cases where the current code\n>> matches the pattern?  That sounds like a bug.\n>\n> Ummm, maybe. You are right, with current git it does work as I would\n> expect (usefully ;-) ).\n>\n> I know I struggled quite a bit with log -S not finding stuff I thought\n> it should and that log -G did find, back a year ago.\n>\n> Damn, I don't have a precise record of what git it was on, nor a good\n> repro example. Too long ago,\n\nSince its beginning, the -S implementation hasn't change that much,\nand I do not remember fixing such a bug. If you saw issues in old\nGit, the same issues would still exist in today's Git.\n\nIt could be that a change to your history (not change to Git) was\nintroduced in an evil merge, and you were running \"git log -p -S\"\nwithout \"-m\", or something.\n"}]}