From: "Frédéric Brière" <fbriere@fbriere.net>
To: git@vger.kernel.org
Cc: "Paul Mackerras" <paulus@samba.org>,
"Frédéric Brière" <fbriere@fbriere.net>
Subject: [PATCH] gitk: Skip over AUTHOR/COMMIT_DATE when searching all fields
Date: Sun, 14 Mar 2010 18:59:09 -0400 [thread overview]
Message-ID: <1268607549-3440-1-git-send-email-fbriere@fbriere.net> (raw)
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
next reply other threads:[~2010-03-14 23:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-14 22:59 Frédéric Brière [this message]
2010-03-20 6:42 ` [PATCH] gitk: Skip over AUTHOR/COMMIT_DATE when searching all fields Jonathan Nieder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1268607549-3440-1-git-send-email-fbriere@fbriere.net \
--to=fbriere@fbriere.net \
--cc=git@vger.kernel.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).