Currently it only contains information about output format, and is not used anywhere. It will be used to check whether current action produces HTML output, and therefore is displaying HTML-based progress info about (re)generating cache makes sense. It can contain information about allowed extra options, whether to display link to feed (Atom or RSS), etc. in easier and faster way than listing all matching or all non-matching actions at appropriate place. Currently not used; will be used in next commit, to check if action produces HTML output and therefore we can use HTML-specific progress indicator. Signed-off-by: Jakub Narebski <jnareb@xxxxxxxxx> --- While it is patch preparing infrastructure to be used by progress indicator (generating info), it is IMHO a good idea in itself, and that is why it is not marked as RFC. This patch is the same as in the previous version. It has no equivalent in "Gitweb cachning v7" series by J.H. gitweb/gitweb.perl | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index f202d6b..da95388 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -818,6 +818,25 @@ our %allowed_options = ( "--no-merges" => [ qw(rss atom log shortlog history) ], ); +our %actions_info = (); +sub evaluate_actions_info { + our %actions_info; + our (%actions); + + # unless explicitely stated otherwise, default output format is html + foreach my $action (keys %actions) { + $actions_info{$action}{'output_format'} = 'html'; + } + # list all exceptions; undef means variable (no definite format) + map { $actions_info{$_}{'output_format'} = 'text' } + qw(commitdiff_plain patch patches project_index blame_data); + map { $actions_info{$_}{'output_format'} = 'xml' } + qw(rss atom opml); # there are different types (document formats) of XML + map { $actions_info{$_}{'output_format'} = undef } + qw(blob_plain object); + $actions_info{'snapshot'}{'output_format'} = 'binary'; +} + # fill %input_params with the CGI parameters. All values except for 'opt' # should be single values, but opt can be an array. We should probably # build an array of parameters that can be multi-valued, but since for the time @@ -1226,6 +1245,7 @@ sub evaluate_argv { sub run { evaluate_argv(); + evaluate_actions_info(); $pre_listen_hook->() if $pre_listen_hook; -- 1.7.3 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html