gitweb: correctly store previous rev in javascript-actions mode

Without this change, the setting

 $feature{'javascript-actions'}{'default'} = [1];

in gitweb.conf breaks gitweb's blame page: clicking on line numbers
displayed in the second column on the page has no effect.

For comparison, with javascript-actions disabled, clicking on line
numbers loads the previous version of the line.

Addresses https://bugs.debian.org/741883.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Robert Luberda <robert@debian.org>
Acked-by: Jakub Narębski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pull/664/head
Robert Luberda 3 years ago committed by Junio C Hamano
parent 5fa0f5238b
commit 52bd3e4657
  1. 2
      gitweb/static/js/blame_incremental.js

@ -484,7 +484,7 @@ function processBlameLines(lines) {
case 'previous':
curCommit.nprevious++;
// store only first 'previous' header
if (!'previous' in curCommit) {
if (!('previous' in curCommit)) {
var parts = data.split(' ', 2);
curCommit.previous = parts[0];
curCommit.file_parent = unquote(parts[1]);

Loading…
Cancel
Save