@matheusbsbs / matheus-bagliano / commits / b3f52a9c3a
Fork 0

gitweb: document $per_request_config better

Global variables $my_url, $my_uri and $base_url have subtle interactions that need to be desribed, and can be influenced most cleanly by $per_request_config. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jonathan Nieder committed Nov 28, 2010 at 18:19 UTC b3f52a9c3a5d02a6d1a3d05fe35deb90b70de510
1 file changed +7 -2
gitweb/README
+7 -2
@@ -177,13 +177,15 @@ not include variables usually directly set during build):
177 * $my_url, $my_uri
178 Full URL and absolute URL of gitweb script;
179 in earlier versions of gitweb you might have need to set those
180 - variables, now there should be no need to do it.
180 + variables, now there should be no need to do it. See
181 + $per_request_config if you need to set them still.
182 * $base_url
183 Base URL for relative URLs in pages generated by gitweb,
184 (e.g. $logo, $favicon, @stylesheets if they are relative URLs),
185 needed and used only for URLs with nonempty PATH_INFO via
186 <base href="$base_url">. Usually gitweb sets its value correctly,
187 and there is no need to set this variable, e.g. to $my_uri or "/".
188 + See $per_request_config if you need to set it anyway.
189 * $home_link
190 Target of the home link on top of all pages (the first part of view
191 "breadcrumbs"). By default set to absolute URI of a page ($my_uri).
@@ -252,7 +254,10 @@ not include variables usually directly set during build):
254 sub { $ENV{GL_USER} = $cgi->remote_user || "gitweb"; }
255 Otherwise it is treated as boolean value: if true gitweb would process
256 config file once per request, if false it would process config file only
255 - once. The default is true.
257 + once. Note: $my_url, $my_uri, and $base_url are overwritten with
258 + their default values before every request, so if you want to change
259 + them, be sure to set this variable to true or a code reference effecting
260 + the desired changes. The default is true.
261
262 Projects list file format
263 ~~~~~~~~~~~~~~~~~~~~~~~~~