jobd.pl: avoid uninitialized warning when no lastgc/lastrefresh
authorKyle J. McKay <mackyle@gmail.com>
Fri, 12 Jul 2013 18:06:49 +0000 (12 11:06 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Fri, 12 Jul 2013 18:06:49 +0000 (12 11:06 -0700)
jobd/jobd.pl

index 3acde5c..fa7a9c8 100755 (executable)
@@ -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;
 }