]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: correctly store previous rev in javascript-actions mode
authorRobert Luberda <redacted>
Sun, 27 Oct 2019 09:14:26 +0000 (10:14 +0100)
committerLady <redacted>
Mon, 6 Apr 2026 04:51:33 +0000 (00:51 -0400)
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 <redacted>
Signed-off-by: Robert Luberda <redacted>
Acked-by: Jakub Narębski <redacted>
Signed-off-by: Junio C Hamano <redacted>
static/js/blame_incremental.js

index c633c44ddafbce0269bc30912db6d9a3852abea28155a097492b18bd32acb9dc..90feb982723bcfbbb2c6730ac616daedb1fd1fc2974426c740faa0d9a8e96fdb 100644 (file)
@@ -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]);
This page took 0.143716 seconds and 4 git commands to generate.