Re: [PATCH 2/3] gitweb: Use "previous" header of git-blame -p in 'blame' view

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH 2/3] gitweb: Use "previous" header of git-blame -p in 'blame' view

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:02

Jakub Narebski [off-list ref] writes:
Luben Tuikov changed 'lineno' link (line number link) from pointing to
'blame' view at given line at blamed commit, to the one at parent of
blamed commit in
  244a70e (Blame "linenr" link jumps to previous state at
           "orig_lineno", 2007-01-04).
This made it possible to do data mining using 'blame' view, by going
through history of a line using mentioned line number link.
I was playing with this feature the other day (and I think you can guess
what I was writing when I was doing so as preparation).  I was mildly
annoyed that these links on the commit object names go to the commit view.

I think going to commitdiff view would make it far more useful while
digging.

Suppose if you were somehow interested in the recent commit by Peff,
"Makefile: install 'git' in execdir".  You go to:

    http://repo.or.cz/w/alt-git.git

and look at commitdiff of the commit from the shortlog part.

You read the diff, understand what the changed Makefile does, but you get
curious to see the blame.  Nicely, the commitdiff view has a list of the
files changed, and each entry in the list has "blame" link.

Clicking it would give you the blame on each line from the Makefile.

So far, very smooth experience.  Then you scroll to an area of the file
you are interested in, and click on one of the commits.

Oops.

It does not show the change of the commit made by this one, even though it
does list Makefile in the list of files changed, and it has a blame link,
the commit view without diff disrupts the thought process I had in the
previous blame page, and I have to go to commitdiff to reorient myself.

Re: [PATCH 2/3] gitweb: Use "previous" header of git-blame -p in 'blame' view

From: Jakub Narebski <hidden>
Date: 2016-06-15 22:47:02

On Sat, 11 July 2009, Junio C Hamano wrote:
Jakub Narebski [off-list ref] writes:
quoted
Luben Tuikov changed 'lineno' link (line number link) from pointing to
'blame' view at given line at blamed commit, to the one at parent of
blamed commit in
  244a70e (Blame "linenr" link jumps to previous state at
           "orig_lineno", 2007-01-04).
This made it possible to do data mining using 'blame' view, by going
through history of a line using mentioned line number link.
I was playing with this feature the other day (and I think you can guess
what I was writing when I was doing so as preparation).  I was mildly
annoyed that these links on the commit object names go to the commit view.

I think going to commitdiff view would make it far more useful while
digging.
[...]

Also with a slight extension of diff part of 'commitdiff', by adding
line numbers for preimage in chunk and line numbers for postimage in
chunk, like e.g. in 'commit' view on GitHub[1] or on Gitorious[2] or
in SVN::Web[3] or in Atlassian FishEye, and adding anchors for those
line numbers we could go to given line in dif/patch output and examine
how it looked like before.

 [1] http://github.com/jnareb/softsnow-xchat2-filter/commit/7b68fcd777f94534f0b794c5dc2e109c49938395
 [2] http://gitorious.org/softsnow-xchat2-filter/mainline/commit/7b68fcd777f94534f0b794c5dc2e109c49938395
 [3] http://jc.ngo.org.uk/svnweb/jc/diff/nik/CPAN/SVN-Web/trunk/README?revs=1283&revs=981

(This would probably require adding 'fmt' / 'format' parameter, where
one could choose between possible ways to view diff, or possible ways
to view log or log-like view.)


P.S. BTW. 'blame' view passes _original_ filename (not filename at
blamed commit) to 'commit' view link... but it doesn't matter because
'commit' view does not use 'f'/$file_name parameter.
-- 
Jakub Narebski
Poland
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help