git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Another gitweb wishlist

From
SVSven Verdoolaege <skimo@kotnet.org>
Date
Sep 21, 2005, 20:54 UTC
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 <file>. 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
Previous: Petr BaudisNext: Petr Baudis
Message 2 of 3 in “Another gitweb wishlist”
  1. Petr BaudisSep 21, 2005
  2. Sven VerdoolaegeSep 21, 2005
  3. Petr BaudisSep 22, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.