summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1dc5e55)
raw | patch | inline | side by side (parent: 1dc5e55)
author | Jakub Narebski <jnareb@gmail.com> | |
Sat, 28 Oct 2006 17:43:40 +0000 (19:43 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 28 Oct 2006 21:26:00 +0000 (14:26 -0700) |
This is purely cosmetic. Having git_get_* between two parse_* subroutines
violated a good convention to group related things together.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
violated a good convention to group related things together.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
gitweb/gitweb.perl | patch | blob | history |
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 7b2499af1ecaf11fa4bd775d2bfcc2abc5f477c0..6714e418750d2835b9d80418daf2d90ab6ab058c 100755 (executable)
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
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;