Re: [PATCH] gitweb: correctly store previous rev in javascript-actions mode
Jonathan Nieder
Jakub Narębski
Robert Luberda
See Also
2019-10-27 09:14:26 UTC
From: Robert Luberda <>
Date: Sun, 16 Mar 2014 22:57:19 +0100

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.


Signed-off-by: Jonathan Nieder <>
Signed-off-by: Robert Luberda <>
> Hi Robert,

> Years ago, you sent this obviously correct patch to the link mentioned
> above, but it got lost in the noise.  Sorry about that.  Hopefully
> late is better than never.


Somehow I missed your e-mail and just have found it today by a chance :(

> May we forge your sign-off?  See
for more details about what this means.

Done, I've added the Signed-off-line above.

> Jakub et al, any thoughts?  I don't see any unit tests in gitweb/static
> that could avoid this regressing --- am I missing some, or if not any
hints for someone who would want to add a test framework?


 gitweb/static/js/blame_incremental.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gitweb/static/js/blame_incremental.js
index db6eb50584..e100d8206b 100644
--- a/gitweb/static/js/blame_incremental.js
+++ b/gitweb/static/js/blame_incremental.js
@@ -484,7 +484,7 @@ function processBlameLines(lines) {
 			case 'previous':
 				// 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]);