threads / discuss / 30113

Re: [GSOC][HELP] Incremental blame in gitweb.

Subject: Re: [GSOC][HELP] Incremental blame in gitweb.

## tl;dr

2 messages between Mar 30, 2012 and Mar 30, 2012.

replies: 1people: 2as markdown or json

jaseem abid· Mar 30, 2012, 21:06 UTC · lore

[GSOC][HELP] Incremental blame in gitweb.

Hello again,

I was learning from the gitweb source code and I am a bit stuck at a particular point. What does incremental blame do in gitweb? I tried to get some information from the documentation. I was expecting it to be used for pagination of huge git-blame output or something similar. Doc says it can be used for similar purposes I notice code written in JavaScript for AJAX calls etc, but i cant find a place where it is being used. Can somebody give me a link to one in k.org or somewhere for a demo? I tried to find some AJAX calls in the web console but cant trace any. I'm a bit confused here.

Any help will be very much appreciated.
-- 
Jaseem Abid
+91 8891 72 43 72
S6 CSE student
National Institute of Technology , Calicut.
Jakub Narebski· Mar 30, 2012, 21:33 UTC · re: jaseem abid · lore
On Fri, 30 Mar 2012, jaseem abid wrote:
Show 12 quoted lines
> I was learning from the gitweb source code and I am a bit stuck at a
> particular point.
> What does incremental blame do in gitweb? I tried to get some
> information from the documentation.
> I was expecting it to be used for pagination of huge git-blame output
> or something similar. Doc says it can be used for similar purposes
> I notice code written in JavaScript for AJAX calls etc, but i cant
> find a place where it is being used. Can somebody give me a link to
> one in k.org or somewhere for a demo? I tried to find some AJAX calls
> in the web console but cant trace any. I'm a bit confused here.
> 
> Any help will be very much appreciated.

The 'incremental_blame' view should produce the same output as ordinary 'blame' view, but in different way (using JavaScript and Ajax, and "git blame --incremental").

With the ordinary 'blame' view we have to wait for the blame data to be generated in full for the whole file (on server) before we get the view. This can take quite a while (and that is why 'blame' feature is disabled by default).

The Ajax-y 'incremental_blame' view gets the contents of the file from "git cat-file blob <blob-id>" and shows it to web browser, then adds blame view incrementally, from the most recent blame to most ancient, calling "git blame --incremental" and getting its response via XHR, and repainting contents of file with blame data.

You can run gitweb by yourself, for example using git-instaweb script (I think it enables all features by default).

HTH
-- 
Jakub Narebski
Poland

← back to recent threads