From bb7b185c3ca1428b1b3c3a0e1c58dc958b3fe382 Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Thu, 19 Jan 2012 17:43:09 +0530 Subject: [PATCH] fix annoying but harmless bug that affected t01/2/3 ...if you called check_config_key() from new_repo() --- src/gitolite.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gitolite.pm b/src/gitolite.pm index 802e86f..011fb6f 100644 --- a/src/gitolite.pm +++ b/src/gitolite.pm @@ -890,6 +890,11 @@ sub check_config_key { my($repo, $key) = @_; my @ret = (); + return () unless exists $git_configs{$repo}; + # otherwise it auto-vivifies if you call it from new_repo() and causes + # harmless but annoying entries in the compiled config file. They + # disappear on the next compile of course, but still... + # look through $git_configs{$repo} and return an array of the values of # all second level keys that match $key. To understand "second level", # you need to remember that %git_configs has elements like this: