summaryrefslogtreecommitdiff
path: root/gitk
diff options
context:
space:
mode:
authorFrédéric Brière <fbriere@fbriere.net>2010-03-14 22:59:09 (GMT)
committerPaul Mackerras <paulus@samba.org>2012-03-18 23:23:43 (GMT)
commit585c27cb22676a55dea2681dfb768e0970cd6639 (patch)
treebc5db10334ccf527188bd8841c3e47c42be61849 /gitk
parent6c9e2d1842c8ab6e283df8633b42254fc1e2fcc6 (diff)
downloadgit-585c27cb22676a55dea2681dfb768e0970cd6639.zip
git-585c27cb22676a55dea2681dfb768e0970cd6639.tar.gz
git-585c27cb22676a55dea2681dfb768e0970cd6639.tar.bz2
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>
Diffstat (limited to 'gitk')
-rwxr-xr-xgitk6
1 files changed, 4 insertions, 2 deletions
diff --git a/gitk b/gitk
index fc54f43..5e3ad15 100755
--- a/gitk
+++ b/gitk
@@ -4659,8 +4659,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"]} {
@@ -6521,7 +6522,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} {
@@ -6582,6 +6583,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