# Another gitweb wishlist

3 messages from 2005-09-21 to 2005-09-22. Participants: Petr Baudis, Sven Verdoolaege.
Thread: https://gitlist.dev/t/1903

## Petr Baudis, 2005-09-21 20:16

Subject: Another gitweb wishlist
Message-ID: <20050921201656.GA10575@pasky.or.cz>
URL: https://gitlist.dev/e/20050921201656.GA10575%40pasky.or.cz

```
  Hello,

  I have accumulated some more stuff I'm missing in gitweb, so I'm
dumping it on you now. ;-)

  (i) Speed - the http://kernel.org/git/ document takes anytime between
roughly 30 seconds to one minute to load. What's taking so long?

  (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

does not quite work right, since there are no links to (most
importantly) the plain view (and blob_plain link doesn't work), tree
view and such.

  (iii) Too hard to follow history of renamed files. Let's take
git-log.sh.  I'll immediately stop at the big rename commit:

	http://kernel.org/git/?p=git/git.git;a=commit;h=215a7ad1ef790467a4cd3f0dcffbd6e5f04c38f7

If I want to continue following its history before the rename, I have to
manually go to the tree of the parent commit and get the history of the
original file there. This is quite annoying and significantly reduces
practicality of the feature on the GIT repository precisely because of
the big rename.

  (iv) Related to (iii), if you get the hb  parameter to the blob view,
you should offer the 'diff' and 'history' links in the blob view. Also
the 'log' and 'shortlog' links should point to more sensible locations,
either the same as in the relevant commit's view, or see (v).

  (v) Only shortlog is available for per-file history. Perhaps it would
be nicer to make 'log' and 'shortlog' links in blob context go to the
file's history, and in file history switch between shortlog/log display
mode.

  Thanks,

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
VI has two modes: the one in which it beeps and the one in which
it doesn't.

```

## Sven Verdoolaege, 2005-09-21 20:54

Subject: Re: Another gitweb wishlist
Message-ID: <20050921205416.GU15165MdfPADPa@greensroom.kotnet.org>
URL: https://gitlist.dev/e/20050921205416.GU15165MdfPADPa%40greensroom.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

```

## Petr Baudis, 2005-09-22 12:33

Subject: Re: Another gitweb wishlist
Message-ID: <20050922123340.GI21019@pasky.or.cz>
URL: https://gitlist.dev/e/20050922123340.GI21019%40pasky.or.cz
In-Reply-To: <20050921205416.GU15165MdfPADPa@greensroom.kotnet.org>

```
Dear diary, on Wed, Sep 21, 2005 at 10:54:16PM CEST, I got a letter
where Sven Verdoolaege <skimo@kotnet.org> told me that...
> 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

This is good, however there is no easy way to see the file's history,
and showing the last repository commit with the file might lead to a
false impression that the commit actually touched the file, even if that
is not the case.

Also, trying to see your changes at

	http://www.liacs.nl/~sverdool/gitweb.cgi?p=gitweb.git;a=summary

shows how nice it would be to have some gitk-ish gitweb view.  That
would be probably a lot of work, though.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
VI has two modes: the one in which it beeps and the one in which
it doesn't.

```
