From: Robert Luberda Date: Sun, 27 Oct 2019 09:14:26 +0000 (+0100) Subject: gitweb: correctly store previous rev in javascript-actions mode X-Git-Url: https://git.ladys.computer/Gitweb/commitdiff_plain/2edb3889e492e025733b938e574bd032cc7a04fa87fa0e5c0d8309f336be9608?ds=inline 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 Signed-off-by: Robert Luberda Acked-by: Jakub Narębski Signed-off-by: Junio C Hamano --- diff --git a/static/js/blame_incremental.js b/static/js/blame_incremental.js index c633c44..90feb98 100644 --- a/static/js/blame_incremental.js +++ b/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]);