Re: [PATCH RFC 1/2] gitweb: Fix warnings with override permitted but no repo override
From: Giuseppe Bilotta <hidden>
Date: 2016-06-15 22:46:14
On Wed, Feb 18, 2009 at 4:00 AM, Marcel M. Cary [off-list ref] wrote:
When a feature like "blame" is permitted to be overridden in the repository configuration but it is not actually set in the repository, a warning is emitted due to the undefined value of the repository configuration, even though it's a perfectly normal condition. The warning is grounds for test failure in the gitweb test script, so it causes some new feature tests of mine to fail. This patch prevents warning and adds a test case to exercise it. Signed-off-by: Marcel M. Cary <redacted> --- Here's a small patch I put together while tinkering with bug hyperlinking. Does this look reasonable?
My only perplexity is about this:
quoted hunk ↗ jump to hunk
@@ -1978,6 +1978,8 @@ sub git_get_project_config { $config_file = "$git_dir/config"; } + return undef if (!defined $config{"gitweb.$key"}); +
I'm no Perl expert, so I have no idea: how do non-bool config checks (which expect arrays) cope with an undef? Also, you may want to add a non-bool override test in the test suite. -- Giuseppe "Oblomov" Bilotta