resolve textual hashes when looking up "refs"
authorKay Sievers <kay.sievers@suse.de>
Thu, 22 Dec 2005 21:58:29 +0000 (22:58 +0100)
committerKay Sievers <kay.sievers@suse.de>
Thu, 22 Dec 2005 21:58:29 +0000 (22:58 +0100)
Thanks to Jon Nelson for the patch.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
gitweb.cgi

index 3735535c8ba5eeac4d08751a70a5a74dfc9f85ca..1814f7f2b3784a61e40cf04fa72cdfd2218de22e 100755 (executable)
@@ -1707,8 +1707,8 @@ sub git_commit {
        }
        my $refs = read_info_ref();
        my $ref = "";
-       if (defined $refs->{$hash}) {
-               $ref = " <span class=\"tag\">" . esc_html($refs->{$hash}) . "</span>";
+       if (defined $refs->{$co{'id'}}) {
+               $ref = " <span class=\"tag\">" . esc_html($refs->{$co{'id'}}) . "</span>";
        }
        git_header_html(undef, $expires);
        print "<div class=\"page_nav\">\n" .
@@ -1949,8 +1949,8 @@ sub git_commitdiff {
        }
        my $refs = read_info_ref();
        my $ref = "";
-       if (defined $refs->{$hash}) {
-               $ref = " <span class=\"tag\">" . esc_html($refs->{$hash}) . "</span>";
+       if (defined $refs->{$co{'id'}}) {
+               $ref = " <span class=\"tag\">" . esc_html($refs->{$co{'id'}}) . "</span>";
        }
        git_header_html(undef, $expires);
        print "<div class=\"page_nav\">\n" .