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

2 messages from 2012-03-30 to 2012-03-30. Participants: Jakub Narebski, jaseem abid.
Thread: https://gitlist.dev/t/30113

## jaseem abid, 2012-03-30 21:06

Subject: [GSOC][HELP] Incremental blame in gitweb.
Message-ID: <CAH-tXsDHJ98LLcHVs5U-OYS1maKoM+sDn6hw5HeD6c6wZ8mBHQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAH-tXsDHJ98LLcHVs5U-OYS1maKoM%2BsDn6hw5HeD6c6wZ8mBHQ%40mail.gmail.com

```
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, 2012-03-30 21:33

Subject: Re: [GSOC][HELP] Incremental blame in gitweb.
Message-ID: <201203302333.48770.jnareb@gmail.com>
URL: https://gitlist.dev/e/201203302333.48770.jnareb%40gmail.com
In-Reply-To: <CAH-tXsDHJ98LLcHVs5U-OYS1maKoM+sDn6hw5HeD6c6wZ8mBHQ@mail.gmail.com>

```
On Fri, 30 Mar 2012, jaseem abid wrote:

> 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

```
