git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] gitweb: Make project specific override for 'grep' feature work

From
Jakub Narebski <jnareb@gmail.com>
Date
Dec 7, 2008, 09:36 UTC
Message-ID
<20081207093447.25785.41811.stgit@localhost.localdomain>
In-Reply-To
<20081207052230.GD4357@ftbfs.org>

The 'grep' feature was marked in the comments as having project specific config, but it lacked 'sub' key required for it to work.

Kind-of-Noticed-by: Matt Kraai <kraai@ftbfs.org>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
Matt Kraai wrote:
> A feature_grep subroutine is defined in gitweb.perl, but unlike the
> other feature_* subroutines there, it doesn't appear to be used
> anywhere.  Should it be removed?

No, it was oversight; it should be used in setting up 'grep' %feature configuration, see below.

Thanks for catching this.
 gitweb/gitweb.perl |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 95988fb..9517392 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -241,6 +241,7 @@ our %feature = (
 	# $feature{'grep'}{'override'} = 1;
 	# and in project config gitweb.grep = 0|1;
 	'grep' => {
+		'sub' => \&feature_grep,
 		'override' => 0,
 		'default' => [1]},
 
Previous: Matt KraaiNext: Junio C Hamano
Message 2 of 4 in “Remove feature_grep in gitweb?”
  1. Matt KraaiDec 7, 2008
  2. gitweb: Make project specific override for 'grep' feature workJakub Narebski, Dec 7, 2008
  3. Junio C HamanoDec 7, 2008
  4. Jakub NarebskiDec 7, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.