{"thread":{"id":"13993","subject":"[PATCH] gitweb: remove unused parse_ref method","startedAt":"2008-06-17T06:25:28Z","lastAt":"2008-06-17T23:27:08Z","messageCount":2,"participants":["Lea Wiemann","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"80102","messageId":"1213683928-15128-1-git-send-email-LeWiemann@gmail.com","threadId":"13993","inReplyTo":null,"subject":"[PATCH] gitweb: remove unused parse_ref method","fromName":"Lea Wiemann","fromEmail":"lewiemann@gmail.com","sentAt":"2008-06-17T06:25:28Z","receivedAt":"2008-06-17T06:25:28Z","isPatch":true,"sender":{"key":"lewiemann@gmail.com","avatar":null},"body":"The parse_ref method became unused in cd1464083c, but the author\ndecided to leave it in.  Now it gets in the way of refactoring, so\nlet's remove it.\n\nSigned-off-by: Lea Wiemann <LeWiemann@gmail.com>\n---\n gitweb/gitweb.perl |   43 -------------------------------------------\n 1 files changed, 0 insertions(+), 43 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex 4de9647..1ed2064 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -2158,49 +2158,6 @@ sub parse_commits {\n \treturn wantarray ? @cos : \\@cos;\n }\n \n-# parse ref from ref_file, given by ref_id, with given type\n-sub parse_ref {\n-\tmy $ref_file = shift;\n-\tmy $ref_id = shift;\n-\tmy $type = shift || git_get_type($ref_id);\n-\tmy %ref_item;\n-\n-\t$ref_item{'type'} = $type;\n-\t$ref_item{'id'} = $ref_id;\n-\t$ref_item{'epoch'} = 0;\n-\t$ref_item{'age'} = \"unknown\";\n-\tif ($type eq \"tag\") {\n-\t\tmy %tag = parse_tag($ref_id);\n-\t\t$ref_item{'comment'} = $tag{'comment'};\n-\t\tif ($tag{'type'} eq \"commit\") {\n-\t\t\tmy %co = parse_commit($tag{'object'});\n-\t\t\t$ref_item{'epoch'} = $co{'committer_epoch'};\n-\t\t\t$ref_item{'age'} = $co{'age_string'};\n-\t\t} elsif (defined($tag{'epoch'})) {\n-\t\t\tmy $age = time - $tag{'epoch'};\n-\t\t\t$ref_item{'epoch'} = $tag{'epoch'};\n-\t\t\t$ref_item{'age'} = age_string($age);\n-\t\t}\n-\t\t$ref_item{'reftype'} = $tag{'type'};\n-\t\t$ref_item{'name'} = $tag{'name'};\n-\t\t$ref_item{'refid'} = $tag{'object'};\n-\t} elsif ($type eq \"commit\"){\n-\t\tmy %co = parse_commit($ref_id);\n-\t\t$ref_item{'reftype'} = \"commit\";\n-\t\t$ref_item{'name'} = $ref_file;\n-\t\t$ref_item{'title'} = $co{'title'};\n-\t\t$ref_item{'refid'} = $ref_id;\n-\t\t$ref_item{'epoch'} = $co{'committer_epoch'};\n-\t\t$ref_item{'age'} = $co{'age_string'};\n-\t} else {\n-\t\t$ref_item{'reftype'} = $type;\n-\t\t$ref_item{'name'} = $ref_file;\n-\t\t$ref_item{'refid'} = $ref_id;\n-\t}\n-\n-\treturn %ref_item;\n-}\n-\n # parse line of git-diff-tree \"raw\" output\n sub parse_difftree_raw_line {\n \tmy $line = shift;\n-- \n1.5.6.rc3.7.ged9620\n"},{"id":"80183","messageId":"7v7icn4p83.fsf@gitster.siamese.dyndns.org","threadId":"13993","inReplyTo":"1213683928-15128-1-git-send-email-LeWiemann@gmail.com","subject":"Re: [PATCH] gitweb: remove unused parse_ref method","fromName":"Junio C Hamano","fromEmail":"junio@pobox.com","sentAt":"2008-06-17T23:27:08Z","receivedAt":"2008-06-17T23:27:08Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks.  It should be safe to have this in 1.5.6.\n"}]}