fix annoying but harmless bug that affected t01/2/3

...if you called check_config_key() from new_repo()
This commit is contained in:
Sitaram Chamarty 2012-01-19 17:43:09 +05:30
parent 70a9ea5e16
commit bb7b185c3c

View file

@ -890,6 +890,11 @@ sub check_config_key {
my($repo, $key) = @_; my($repo, $key) = @_;
my @ret = (); 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 # look through $git_configs{$repo} and return an array of the values of
# all second level keys that match $key. To understand "second level", # all second level keys that match $key. To understand "second level",
# you need to remember that %git_configs has elements like this: # you need to remember that %git_configs has elements like this: