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

Re: suggestions for gitweb

From
Jakub Narebski <jnareb@gmail.com>
Date
May 14, 2007, 16:49 UTC
Message-ID
<200705141849.36457.jnareb@gmail.com>
In-Reply-To
<20070514095857.GI4489@pasky.or.cz>
On Mon, 14 May 2007, Petr Baudis <pasky@suse.cz> wrote:
> On Mon, May 14, 2007 at 10:53:15AM CEST, Michael Niedermayer wrote:
Show 13 quoted lines
>> also file size and last modified dates would be interresting on the tree
>> page
>> viewvc displays on its equivalent page, time since last change
>> svn revission of the last change, the author/commiter of the last change
>> and the corresponding abbreviated log entry
> 
>   I guess this is much easier to retrieve in svn than in git - you
> actually have to walk all the history to figure out this information as
> there's no global per-file info; so this is very troublesome
> performance-wise. I think there were some patches on the mailinglist
> that dit this, though I'm not sure. Might be reasonable to cache this
> (and git history properties make it possible to nicely make a very
> easily reusable cache for this information).

I have sent some implementations of tree_blame, without any core support, directly in Perl (in gitweb), just like early versions of git-annotate. It did suck performance-wise quite a bit. You can find it in 'gitweb/tree_blame' branch in my git repository at repo.or.cz

  http://repo.or.cz/w/git/jnareb-git.git?a=shortlog;h=gitweb/tree_blame

I think it would be nice to have --blame option to git-ls-tree (optionally copuled with --porcelain and perhaps --incremental, like in git-blame), which would return blame information for tree entries. It means that for each tree entry return commit closest to given commit (or furthest from a given commit) which has changed entry to current version. It should be much easier and faster than to do "blob"-blame.

The --porcelain would also return 'last changed' info, like committer info for a commit-which-changed.

But is this info actually interesting, or is it there in ViewVC because
it is easy to get this info in CVS and Subversion? The "last changed"
info for tree entries encourages to think of a history as a collection
of per file histories... while git is all about whole project history.
Note that history of two files is *more* than concatenation of
histories of those individual files. See entries on GitFaq wiki page:
 
>   About file sizes, that also has some extra performance hit, but in
> this case I suspect that it would be totally negligible (if implemented
> at the plumbing level) - and I admit that I would like to see file sizes
> too, they can help orientation in a foreign source tree a lot.

It should be very easy to add --long / --sizes option to git-ls-tree which would return file sizes, perhaps after mode info.

-- 
Jakub Narebski
ShadeHawk on #git
Poland
Previous: Petr BaudisNext: Michael Niedermayer
Message 19 of 21 in “suggestions for gitweb”
  1. Michael NiedermayerMay 12, 2007
  2. Junio C HamanoMay 12, 2007
  3. Aaron GrayMay 12, 2007
  4. Jakub NarebskiMay 13, 2007
  5. Junio C HamanoMay 13, 2007
  6. Jakub NarebskiMay 13, 2007
  7. Lars HjemliMay 13, 2007
  8. Suggestions for cgit (was: Re: suggestions for gitweb)Jakub Narebski, May 14, 2007
  9. Lars HjemliMay 14, 2007
  10. Lars HjemliMay 15, 2007
  11. Michael NiedermayerMay 13, 2007
  12. Jakub NarebskiMay 13, 2007
  13. Junio C HamanoMay 14, 2007
  14. Petr BaudisMay 14, 2007
  15. Michael NiedermayerMay 14, 2007
  16. Petr BaudisMay 14, 2007
  17. Michael NiedermayerMay 14, 2007
  18. Petr BaudisMay 14, 2007
  19. Jakub NarebskiMay 14, 2007
  20. Michael NiedermayerMay 14, 2007
  21. Jan HudecMay 15, 2007

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.