git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Two gitweb bugs related to javascript-actions
@ 2014-07-22 20:41 Robert Luberda
  2018-12-16 23:24 ` [PATCH] gitweb: correctly store previous rev in javascript-actions mode Jonathan Nieder
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Luberda @ 2014-07-22 20:41 UTC (permalink / raw)
  To: git

Hi

Some time ago I reported the two following bugs to Debian BTS,
could you please look at them?

  1. http://bugs.debian.org/741883 -- gitweb blame does not work
correctly when $feature{'javascript-actions'} is enabled

This should be one-line change fix, which I really would like to be
applied to the git package itself, not to do the same change over and
over again every time my gitweb package is updated on my system.

  2. https://bugs.debian.org/741884 feature{'javascript-actions'} breaks
external links

This might be more challenging, but the simplest approach would be avoid
adding those strange '[#?]js=1' parts to non-gitweb-generated links.

Thanks a lot,
robert

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] gitweb: correctly store previous rev in javascript-actions mode
  2014-07-22 20:41 Two gitweb bugs related to javascript-actions Robert Luberda
@ 2018-12-16 23:24 ` Jonathan Nieder
  2019-10-27  9:14   ` Robert Luberda
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Nieder @ 2018-12-16 23:24 UTC (permalink / raw)
  To: Robert Luberda; +Cc: git, Jakub Narębski

From: Robert Luberda <robert@debian.org>
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.

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

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
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.

May we forge your sign-off?  See
https://www.kernel.org/pub/software/scm/git/docs/SubmittingPatches.html#sign-off
for more details about what this means.

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?

Thanks,
Jonathan

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

diff --git a/gitweb/static/js/blame_incremental.js b/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':
 				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]);
-- 
2.20.0.405.gbc1bbc6f85


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] gitweb: correctly store previous rev in javascript-actions mode
  2018-12-16 23:24 ` [PATCH] gitweb: correctly store previous rev in javascript-actions mode Jonathan Nieder
@ 2019-10-27  9:14   ` Robert Luberda
  2019-10-27 10:27     ` Jakub Narebski
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Luberda @ 2019-10-27  9:14 UTC (permalink / raw)
  To: Jonathan Nieder; +Cc: git, Jakub Narębski

From: Robert Luberda <robert@debian.org>
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.

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

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Robert Luberda <robert@debian.org>
---
> 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.

Hi,

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

> May we forge your sign-off?  See
https://www.kernel.org/pub/software/scm/git/docs/SubmittingPatches.html#sign-off
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?

Thanks,
Robert

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

diff --git a/gitweb/static/js/blame_incremental.js
b/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':
 				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]);
-- 
2.20.0.405.gbc1bbc6f85




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] gitweb: correctly store previous rev in javascript-actions mode
  2019-10-27  9:14   ` Robert Luberda
@ 2019-10-27 10:27     ` Jakub Narebski
  0 siblings, 0 replies; 4+ messages in thread
From: Jakub Narebski @ 2019-10-27 10:27 UTC (permalink / raw)
  To: Robert Luberda; +Cc: Jonathan Nieder, git

Robert Luberda <robert@debian.org> writes:

> From: Robert Luberda <robert@debian.org>
> 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.
>
> Addresses https://bugs.debian.org/741883.
>
> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
> Signed-off-by: Robert Luberda <robert@debian.org>

For what it is worth it (because I am not active in gitweb development):

Acked-by: Jakub Narębski <jnareb@gmail.com>

> ---
>> 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.
>
> Hi,
>
> Somehow I missed your e-mail and just have found it today by a chance :(
>
>> May we forge your sign-off?  See
>> https://www.kernel.org/pub/software/scm/git/docs/SubmittingPatches.html#sign-off
>> for more details about what this means.
>
> Done, I've added the Signed-off-line above.

Thanks for following this up.

>> 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?

We currently have no tests for the JavaScript in gitweb code; I am not
sure how one would go to add such tests (and whether it would be
possible while gitweb is part of git - if they need externel
dependencies like Node.js or Selenium they would need to be able to be
disabled or enabled with builld option).

>  gitweb/static/js/blame_incremental.js | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gitweb/static/js/blame_incremental.js
> b/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':
>  				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]);

Thanks,
-- 
Jakub Narębski

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-27 10:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-22 20:41 Two gitweb bugs related to javascript-actions Robert Luberda
2018-12-16 23:24 ` [PATCH] gitweb: correctly store previous rev in javascript-actions mode Jonathan Nieder
2019-10-27  9:14   ` Robert Luberda
2019-10-27 10:27     ` Jakub Narebski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).