Skip to contentSkip to conversation

Remove feature_grep in gitweb?

PATCH In review Matt Kraai 3 participants 4 messages Jun 15, 2016

lore
Share & tools
lore

Matt Kraai

author
#0 lore raw

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?

Signature · 1 line
Matt                                                 http://ftbfs.org/
#1 lore raw

PATCH 1/1 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.

---

Quoted 3 lines · Matt Kraai

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(-)
gitweb/gitweb.perl +1 -0
index 95988fb..9517392 100755
@@ -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]},
 
#2 lore raw

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

Thanks, both. This should go to maint, right?

#3 lore raw

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

Quoted 2 lines · Junio C Hamano

Thanks, both. This should go to maint, right?

Yes, I think so.

Signature · 2 lines
Jakub Narebski
Poland