From: Kyle J. McKay Date: Fri, 12 Jul 2013 18:06:49 +0000 (-0700) Subject: jobd.pl: avoid uninitialized warning when no lastgc/lastrefresh X-Git-Url: https://repo.or.cz/w/girocco.git/commitdiff_plain/1ad28150ec546b2cca01498420a070c49e6e2880 jobd.pl: avoid uninitialized warning when no lastgc/lastrefresh --- diff --git a/jobd/jobd.pl b/jobd/jobd.pl index 3acde5c..fa7a9c8 100755 --- a/jobd/jobd.pl +++ b/jobd/jobd.pl @@ -103,7 +103,7 @@ sub is_operation_uptodate { my ($project, $which, $threshold) = @_; my $path = get_project_path($project); my $timestamp = `GIT_DIR="$path" $Girocco::Config::git_bin config "gitweb.$which"`; - my $unix_ts = parse_date($timestamp); + my $unix_ts = parse_date($timestamp) || 0; (time - $unix_ts) <= $threshold ? $timestamp : undef; }