return $owner;
}
+sub git_get_last_activity {
+ my ($path) = @_;
+ my $fd;
+
+ $git_dir = "$projectroot/$path";
+ open($fd, "-|", git_cmd(), 'for-each-ref',
+ '--format=%(refname) %(committer)',
+ '--sort=-committerdate',
+ 'refs/heads') or return;
+ my $most_recent = <$fd>;
+ close $fd or return;
+ if ($most_recent =~ / (\d+) [-+][01]\d\d\d$/) {
+ my $timestamp = $1;
+ my $age = time - $timestamp;
+ return ($age, age_string($age));
+ }
+}
+
sub git_get_references {
my $type = shift || "";
my %refs;
return %tag
}
-sub git_get_last_activity {
- my ($path) = @_;
- my $fd;
-
- $git_dir = "$projectroot/$path";
- open($fd, "-|", git_cmd(), 'for-each-ref',
- '--format=%(refname) %(committer)',
- '--sort=-committerdate',
- 'refs/heads') or return;
- my $most_recent = <$fd>;
- close $fd or return;
- if ($most_recent =~ / (\d+) [-+][01]\d\d\d$/) {
- my $timestamp = $1;
- my $age = time - $timestamp;
- return ($age, age_string($age));
- }
-}
-
sub parse_commit {
my $commit_id = shift;
my $commit_text = shift;