gitk: Skip over AUTHOR/COMMIT_DATE when searching all fields

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> Signed-off-by: Paul Mackerras <paulus@samba.org>

Frédéric Brière committed Mar 14, 2010 at 18:59 UTC 585c27cb22676a55dea2681dfb768e0970cd6639
1 file changed +4 -2
gitk
+4 -2
@@ -4659,8 +4659,9 @@ proc askfindhighlight {row id} {
4659 }
4660 set info $commitinfo($id)
4661 set isbold 0
4662 - set fldtypes [list [mc Headline] [mc Author] [mc Date] [mc Committer] [mc CDate] [mc Comments]]
4662 + set fldtypes [list [mc Headline] [mc Author] "" [mc Committer] "" [mc Comments]]
4663 foreach f $info ty $fldtypes {
4664 + if {$ty eq ""} continue
4665 if {($findloc eq [mc "All fields"] || $findloc eq $ty) &&
4666 [doesmatch $f]} {
4667 if {$ty eq [mc "Author"]} {
@@ -6521,7 +6522,7 @@ proc findmore {} {
6522 if {![info exists find_dirn]} {
6523 return 0
6524 }
6524 - set fldtypes [list [mc "Headline"] [mc "Author"] [mc "Date"] [mc "Committer"] [mc "CDate"] [mc "Comments"]]
6525 + set fldtypes [list [mc "Headline"] [mc "Author"] "" [mc "Committer"] "" [mc "Comments"]]
6526 set l $findcurline
6527 set moretodo 0
6528 if {$find_dirn > 0} {
@@ -6582,6 +6583,7 @@ proc findmore {} {
6583 }
6584 set info $commitinfo($id)
6585 foreach f $info ty $fldtypes {
6586 + if {$ty eq ""} continue
6587 if {($findloc eq [mc "All fields"] || $findloc eq $ty) &&
6588 [doesmatch $f]} {
6589 set found 1