git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH resend] gitk: Skip over AUTHOR/COMMIT_DATE when searching all fields
@ 2012-03-08 12:35 Jonathan Nieder
  2012-03-18 23:24 ` Paul Mackerras
  0 siblings, 1 reply; 2+ messages in thread
From: Jonathan Nieder @ 2012-03-08 12:35 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: git, Pat Thoyts, Frédéric Brière

From: Frédéric Brière <fbriere@fbriere.net>
Date: Sun, 14 Mar 2010 18:59:09 -0400

This prevents a search for a number like "105" on "All Fields" from
matching against the raw author and commit timestamps.  These
timestamps were already not searchable by themselves, and the
displayed format does not match the query string anyway.

Signed-off-by: Frédéric Brière <fbriere@fbriere.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
Last seen at [1].  Since then, the commit message was tweaked for
clarity but not other changes.

[1] http://thread.gmane.org/gmane.comp.version-control.git/142160

 gitk-git/gitk |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gitk-git/gitk b/gitk-git/gitk
index 6981cb20..17ba10a8 100755
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -4630,8 +4630,9 @@ proc askfindhighlight {row id} {
     }
     set info $commitinfo($id)
     set isbold 0
-    set fldtypes [list [mc Headline] [mc Author] [mc Date] [mc Committer] [mc CDate] [mc Comments]]
+    set fldtypes [list [mc Headline] [mc Author] "" [mc Committer] "" [mc Comments]]
     foreach f $info ty $fldtypes {
+	if {$ty eq ""} continue
 	if {($findloc eq [mc "All fields"] || $findloc eq $ty) &&
 	    [doesmatch $f]} {
 	    if {$ty eq [mc "Author"]} {
@@ -6492,7 +6493,7 @@ proc findmore {} {
     if {![info exists find_dirn]} {
 	return 0
     }
-    set fldtypes [list [mc "Headline"] [mc "Author"] [mc "Date"] [mc "Committer"] [mc "CDate"] [mc "Comments"]]
+    set fldtypes [list [mc "Headline"] [mc "Author"] "" [mc "Committer"] "" [mc "Comments"]]
     set l $findcurline
     set moretodo 0
     if {$find_dirn > 0} {
@@ -6553,6 +6554,7 @@ proc findmore {} {
 	    }
 	    set info $commitinfo($id)
 	    foreach f $info ty $fldtypes {
+		if {$ty eq ""} continue
 		if {($findloc eq [mc "All fields"] || $findloc eq $ty) &&
 		    [doesmatch $f]} {
 		    set found 1
-- 
1.7.9.2

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

* Re: [PATCH resend] gitk: Skip over AUTHOR/COMMIT_DATE when searching all fields
  2012-03-08 12:35 [PATCH resend] gitk: Skip over AUTHOR/COMMIT_DATE when searching all fields Jonathan Nieder
@ 2012-03-18 23:24 ` Paul Mackerras
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Mackerras @ 2012-03-18 23:24 UTC (permalink / raw)
  To: Jonathan Nieder; +Cc: git, Pat Thoyts, Frédéric Brière

On Thu, Mar 08, 2012 at 06:35:50AM -0600, Jonathan Nieder wrote:
> From: Frédéric Brière <fbriere@fbriere.net>
> Date: Sun, 14 Mar 2010 18:59:09 -0400
> 
> This prevents a search for a number like "105" on "All Fields" from
> matching against the raw author and commit timestamps.  These
> timestamps were already not searchable by themselves, and the
> displayed format does not match the query string anyway.
> 
> Signed-off-by: Frédéric Brière <fbriere@fbriere.net>
> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>

Thanks, applied.

Paul.

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

end of thread, other threads:[~2012-03-18 23:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-08 12:35 [PATCH resend] gitk: Skip over AUTHOR/COMMIT_DATE when searching all fields Jonathan Nieder
2012-03-18 23:24 ` Paul Mackerras

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).