@matheusbsbs / matheus-bagliano / commits / 61fb0b75d1
Fork 0

gitweb: remove unused parse_ref method

The parse_ref method became unused in cd1464083c, 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 <LeWiemann@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Lea Wiemann committed Jun 17, 2008 at 08:25 UTC 61fb0b75d138032c7600fe86640897b900f2fd4f
1 file changed -43
gitweb/gitweb.perl
-43
@@ -2162,49 +2162,6 @@ sub parse_commits {
2162 return wantarray ? @cos : \@cos;
2163 }
2164
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 -
2165 # parse line of git-diff-tree "raw" output
2166 sub parse_difftree_raw_line {
2167 my $line = shift;