From 52bd3e46574baecf06562d4da857ba445981beb9 Mon Sep 17 00:00:00 2001 From: Robert Luberda Date: Sun, 27 Oct 2019 10:14:26 +0100 Subject: gitweb: correctly store previous rev in javascript-actions mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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/gitweb/static/js/blame_incremental.js b/gitweb/static/js/blame_incremental.js index db6eb50..e100d82 100644 --- a/gitweb/static/js/blame_incremental.js +++ b/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]); -- cgit v0.10.2-6-g49f6