git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] gitk: Skip over AUTHOR/COMMIT_DATE when searching all fields
@ 2010-03-14 22:59 Frédéric Brière
  2010-03-20  6:42 ` Jonathan Nieder
  0 siblings, 1 reply; 2+ messages in thread
From: Frédéric Brière @ 2010-03-14 22:59 UTC (permalink / raw
  To: git; +Cc: Paul Mackerras, Frédéric Brière

This prevents searches on "All Fields" from matching against the
author/commit timestamps.  Not only are these timestamps not searchable
by themselves, but the displayed format will not match the query string
anyway.

Signed-off-by: Frédéric Brière <fbriere@fbriere.net>
---
 gitk-git/gitk |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/gitk-git/gitk b/gitk-git/gitk
index 1f36a3e..d7e3c45 100644
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -4591,8 +4591,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"]} {
@@ -6438,7 +6439,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} {
@@ -6499,6 +6500,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.0

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

* Re: [PATCH] gitk: Skip over AUTHOR/COMMIT_DATE when searching all fields
  2010-03-14 22:59 [PATCH] gitk: Skip over AUTHOR/COMMIT_DATE when searching all fields Frédéric Brière
@ 2010-03-20  6:42 ` Jonathan Nieder
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Nieder @ 2010-03-20  6:42 UTC (permalink / raw
  To: Paul Mackerras; +Cc: git, Frédéric Brière

Frédéric Brière wrote:

> This prevents searches on "All Fields" from matching against the
> author/commit timestamps.  Not only are these timestamps not searchable
> by themselves, but the displayed format will not match the query string
> anyway.
> 
> Signed-off-by: Frédéric Brière <fbriere@fbriere.net>

Reviewed-and-tested-by: Jonathan Nieder <jrnieder@gmail.com>

There’s a follow-up patch to remove the duplicated code this touches
(no functional changes) at <http://bugs.debian.org/465776>.

Thanks again.
Jonathan

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

end of thread, other threads:[~2010-03-20  6:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-14 22:59 [PATCH] gitk: Skip over AUTHOR/COMMIT_DATE when searching all fields Frédéric Brière
2010-03-20  6:42 ` Jonathan Nieder

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).