Skip to content

Commit 17848fc

Browse files
jnarebJunio C Hamano
authored andcommitted
gitweb: Improve comments about gitweb features configuration
Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent 73c9083 commit 17848fc

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

gitweb/gitweb.perl

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,16 @@
6767
# You define site-wide feature defaults here; override them with
6868
# $GITWEB_CONFIG as necessary.
6969
our %feature = (
70-
# feature => {'sub' => feature-sub, 'override' => allow-override, 'default' => [ default options...]
71-
# if feature is overridable, feature-sub will be called with default options;
72-
# return value indicates if to enable specified feature
70+
# feature => {
71+
# 'sub' => feature-sub (subroutine),
72+
# 'override' => allow-override (boolean),
73+
# 'default' => [ default options...] (array reference)}
74+
#
75+
# if feature is overridable (it means that allow-override has true value,
76+
# then feature-sub will be called with default options as parameters;
77+
# return value of feature-sub indicates if to enable specified feature
78+
#
79+
# use gitweb_check_feature(<feature>) to check if <feature> is enabled
7380

7481
'blame' => {
7582
'sub' => \&feature_blame,
@@ -95,9 +102,9 @@ sub gitweb_check_feature {
95102
}
96103

97104
# To enable system wide have in $GITWEB_CONFIG
98-
# $feature{'blame'}{'default'} = [1];
99-
# To have project specific config enable override in $GITWEB_CONFIG
100-
# $feature{'blame'}{'override'} = 1;
105+
# $feature{'blame'}{'default'} = [1];
106+
# To have project specific config enable override in $GITWEB_CONFIG
107+
# $feature{'blame'}{'override'} = 1;
101108
# and in project config gitweb.blame = 0|1;
102109

103110
sub feature_blame {
@@ -113,9 +120,9 @@ sub feature_blame {
113120
}
114121

115122
# To disable system wide have in $GITWEB_CONFIG
116-
# $feature{'snapshot'}{'default'} = [undef];
117-
# To have project specific config enable override in $GITWEB_CONFIG
118-
# $feature{'blame'}{'override'} = 1;
123+
# $feature{'snapshot'}{'default'} = [undef];
124+
# To have project specific config enable override in $GITWEB_CONFIG
125+
# $feature{'blame'}{'override'} = 1;
119126
# and in project config gitweb.snapshot = none|gzip|bzip2
120127

121128
sub feature_snapshot {

0 commit comments

Comments
 (0)