author | Jakub Narebski <jnareb@gmail.com> | |
Thu, 23 Feb 2012 15:54:46 +0000 (16:54 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 23 Feb 2012 20:49:37 +0000 (12:49 -0800) | ||
commit | 14b289bdf7c31176dc525cbe81173ec636598782 | |
tree | 8c17e005f4d74f5d630d05afccf338e513b678c1 | tree | snapshot |
parent | b0d66b5110faaeb395610ba43b6eb70a18ab5e25 | commit | diff |
gitweb: Refactor checking if part of project info need filling
Extract the check if given keys (given parts) of project info needs to
be filled into project_info_needs_filling() subroutine. It is for now
a thin wrapper around "!exists $project_info->{$key}".
Note that !defined was replaced by more correct !exists.
While at it uniquify treating of all project info, adding checks for
'age' field before running git_get_last_activity(), and also checking
for all keys filled in code protected by conditional, and not only
one.
The code now looks like this
foreach my $project (@$project_list) {
if (given keys need to be filled) {
fill given keys
}
...
}
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Extract the check if given keys (given parts) of project info needs to
be filled into project_info_needs_filling() subroutine. It is for now
a thin wrapper around "!exists $project_info->{$key}".
Note that !defined was replaced by more correct !exists.
While at it uniquify treating of all project info, adding checks for
'age' field before running git_get_last_activity(), and also checking
for all keys filled in code protected by conditional, and not only
one.
The code now looks like this
foreach my $project (@$project_list) {
if (given keys need to be filled) {
fill given keys
}
...
}
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
gitweb/gitweb.perl | diff | blob | history |