{"thread":{"id":"23015","subject":"[PATCH] gitk: Skip over AUTHOR/COMMIT_DATE when searching all fields","startedAt":"2010-03-14T22:59:09Z","lastAt":"2010-03-20T06:42:48Z","messageCount":2,"participants":["Frédéric Brière","Jonathan Nieder"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"136782","messageId":"1268607549-3440-1-git-send-email-fbriere@fbriere.net","threadId":"23015","inReplyTo":null,"subject":"[PATCH] gitk: Skip over AUTHOR/COMMIT_DATE when searching all fields","fromName":"Frédéric Brière","fromEmail":"fbriere@fbriere.net","sentAt":"2010-03-14T22:59:09Z","receivedAt":"2010-03-14T22:59:09Z","isPatch":true,"sender":{"key":"fbriere@fbriere.net","avatar":null},"body":"This prevents searches on \"All Fields\" from matching against the\nauthor/commit timestamps.  Not only are these timestamps not searchable\nby themselves, but the displayed format will not match the query string\nanyway.\n\nSigned-off-by: Frédéric Brière <fbriere@fbriere.net>\n---\n gitk-git/gitk |    6 ++++--\n 1 files changed, 4 insertions(+), 2 deletions(-)\n\ndiff --git a/gitk-git/gitk b/gitk-git/gitk\nindex 1f36a3e..d7e3c45 100644\n--- a/gitk-git/gitk\n+++ b/gitk-git/gitk\n@@ -4591,8 +4591,9 @@ proc askfindhighlight {row id} {\n     }\n     set info $commitinfo($id)\n     set isbold 0\n-    set fldtypes [list [mc Headline] [mc Author] [mc Date] [mc Committer] [mc CDate] [mc Comments]]\n+    set fldtypes [list [mc Headline] [mc Author] \"\" [mc Committer] \"\" [mc Comments]]\n     foreach f $info ty $fldtypes {\n+\tif {$ty eq \"\"} continue\n \tif {($findloc eq [mc \"All fields\"] || $findloc eq $ty) &&\n \t    [doesmatch $f]} {\n \t    if {$ty eq [mc \"Author\"]} {\n@@ -6438,7 +6439,7 @@ proc findmore {} {\n     if {![info exists find_dirn]} {\n \treturn 0\n     }\n-    set fldtypes [list [mc \"Headline\"] [mc \"Author\"] [mc \"Date\"] [mc \"Committer\"] [mc \"CDate\"] [mc \"Comments\"]]\n+    set fldtypes [list [mc \"Headline\"] [mc \"Author\"] \"\" [mc \"Committer\"] \"\" [mc \"Comments\"]]\n     set l $findcurline\n     set moretodo 0\n     if {$find_dirn > 0} {\n@@ -6499,6 +6500,7 @@ proc findmore {} {\n \t    }\n \t    set info $commitinfo($id)\n \t    foreach f $info ty $fldtypes {\n+\t\tif {$ty eq \"\"} continue\n \t\tif {($findloc eq [mc \"All fields\"] || $findloc eq $ty) &&\n \t\t    [doesmatch $f]} {\n \t\t    set found 1\n-- \n1.7.0\n"},{"id":"137315","messageId":"20100320064248.GA26648@progeny.tock","threadId":"23015","inReplyTo":"1268607549-3440-1-git-send-email-fbriere@fbriere.net","subject":"Re: [PATCH] gitk: Skip over AUTHOR/COMMIT_DATE when searching all fields","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-03-20T06:42:48Z","receivedAt":"2010-03-20T06:42:48Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Frédéric Brière wrote:\n\n> This prevents searches on \"All Fields\" from matching against the\n> author/commit timestamps.  Not only are these timestamps not searchable\n> by themselves, but the displayed format will not match the query string\n> anyway.\n> \n> Signed-off-by: Frédéric Brière <fbriere@fbriere.net>\n\nReviewed-and-tested-by: Jonathan Nieder <jrnieder@gmail.com>\n\nThere’s a follow-up patch to remove the duplicated code this touches\n(no functional changes) at <http://bugs.debian.org/465776>.\n\nThanks again.\nJonathan\n"}]}