Skip to content

Commit 61fb0b7

Browse files
Lea Wiemanngitster
authored andcommitted
gitweb: remove unused parse_ref method
The parse_ref method became unused in cd14640, but the author decided to leave it in. Now it gets in the way of refactoring, so let's remove it. Signed-off-by: Lea Wiemann <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 516381d commit 61fb0b7

File tree

1 file changed

+0
-43
lines changed

1 file changed

+0
-43
lines changed

gitweb/gitweb.perl

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -2162,49 +2162,6 @@ sub parse_commits {
21622162
return wantarray ? @cos : \@cos;
21632163
}
21642164

2165-
# parse ref from ref_file, given by ref_id, with given type
2166-
sub parse_ref {
2167-
my $ref_file = shift;
2168-
my $ref_id = shift;
2169-
my $type = shift || git_get_type($ref_id);
2170-
my %ref_item;
2171-
2172-
$ref_item{'type'} = $type;
2173-
$ref_item{'id'} = $ref_id;
2174-
$ref_item{'epoch'} = 0;
2175-
$ref_item{'age'} = "unknown";
2176-
if ($type eq "tag") {
2177-
my %tag = parse_tag($ref_id);
2178-
$ref_item{'comment'} = $tag{'comment'};
2179-
if ($tag{'type'} eq "commit") {
2180-
my %co = parse_commit($tag{'object'});
2181-
$ref_item{'epoch'} = $co{'committer_epoch'};
2182-
$ref_item{'age'} = $co{'age_string'};
2183-
} elsif (defined($tag{'epoch'})) {
2184-
my $age = time - $tag{'epoch'};
2185-
$ref_item{'epoch'} = $tag{'epoch'};
2186-
$ref_item{'age'} = age_string($age);
2187-
}
2188-
$ref_item{'reftype'} = $tag{'type'};
2189-
$ref_item{'name'} = $tag{'name'};
2190-
$ref_item{'refid'} = $tag{'object'};
2191-
} elsif ($type eq "commit"){
2192-
my %co = parse_commit($ref_id);
2193-
$ref_item{'reftype'} = "commit";
2194-
$ref_item{'name'} = $ref_file;
2195-
$ref_item{'title'} = $co{'title'};
2196-
$ref_item{'refid'} = $ref_id;
2197-
$ref_item{'epoch'} = $co{'committer_epoch'};
2198-
$ref_item{'age'} = $co{'age_string'};
2199-
} else {
2200-
$ref_item{'reftype'} = $type;
2201-
$ref_item{'name'} = $ref_file;
2202-
$ref_item{'refid'} = $ref_id;
2203-
}
2204-
2205-
return %ref_item;
2206-
}
2207-
22082165
# parse line of git-diff-tree "raw" output
22092166
sub parse_difftree_raw_line {
22102167
my $line = shift;

0 commit comments

Comments
 (0)