threads / discuss / 16621

Remove feature_grep in gitweb?

Subject: Remove feature_grep in gitweb?

## tl;dr

4 messages between Dec 7, 2008 and Dec 7, 2008.

replies: 3people: 3as markdown or json

Matt Kraai· Dec 7, 2008, 05:22 UTC · lore
Howdy,

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?

-- 
Matt                                                 http://ftbfs.org/
Jakub Narebski· Dec 7, 2008, 09:36 UTC · re: Matt Kraai · lore

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

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]},
 
Jakub Narebski· Dec 7, 2008, 11:16 UTC · re: Junio C Hamano · lore

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

On Sun, 7 Dec 2008, Junio C Hamano wrote:
> Thanks, both.  This should go to maint, right?
> 
Yes, I think so.
-- 
Jakub Narebski
Poland

← back to recent threads