From: Sven Verdoolaege Date: Wed, 21 Sep 2005 20:54:16 GMT Subject: Re: Another gitweb wishlist Message-ID: <20050921205416.GU15165MdfPADPa@greensroom.kotnet.org> In-Reply-To: <20050921201656.GA10575@pasky.or.cz> On Wed, Sep 21, 2005 at 10:16:56PM +0200, Petr Baudis wrote: > (ii) I need persistent links to the latest version of . Obvious > > http://kernel.org/git/?p=cogito/cogito.git;a=blob;f=contrib/ciabot.pl > Works for me: http://www.liacs.nl/~sverdool/gitweb.cgi?p=barvinok.git;a=blob;f=README It's probably this one: diff --git a/gitweb.cgi b/gitweb.cgi --- a/gitweb.cgi +++ b/gitweb.cgi @@ -1269,9 +1269,9 @@ sub git_get_hash_by_path { } sub git_blob { + $hash_base ||= git_read_hash("$project/HEAD"); if (!defined $hash && defined $file_name) { - my $base = $hash_base || git_read_hash("$project/HEAD"); - $hash = git_get_hash_by_path($base, $file_name, "blob"); + $hash = git_get_hash_by_path($hash_base, $file_name, "blob"); } open my $fd, "-|", "$gitbin/git-cat-file blob $hash" or die_error(undef, "Open failed."); my $base = $file_name || ""; skimo