Re: [PATCH] gitweb.js: Harden setting blamed commit info in incremental blame
Quoting Jakub Narebski <jnareb@gmail.com>
> On Sat, 21 Nov 2009, Jakub Narebski wrote:
>
> Below the same patch is in the form of a proper commit; although the title
> (subject) of this commit could be better...
Does this replace the first of the previous two-patch series? Is Stephen's second patch still needed (with his fix)?
Quoting Stephen Boyd <bebarino@gmail.com>
Show 27 quoted lines
> Jakub Narebski wrote:
>> I have tested gitweb with both of your patches applied, serving gitweb
>> as CGI script using Apache 2.0.54 on Linux, and viewing from separate
>> computer on MS Windows XP, with the following results:
>>
>> * For the following browsers blame_incremental view on gitweb/gitweb.perl
>> file produces correct output, but for progress info which instead of
>> ( 1%) -> ( 29%) -> (100%) looks more like ( 1%) -> (29%) -> (100%)
>
> This is due to an off-by-one error in the while loop. This should fix
> it. I'll probably squash this into patch 2 and resend.
>
> --->8----
>
> diff --git a/gitweb/gitweb.js b/gitweb/gitweb.js
> index 30597dd..9214497 100644
> --- a/gitweb/gitweb.js
> +++ b/gitweb/gitweb.js
> @@ -43,7 +43,7 @@ function padLeftStr(input, width, str) {
> var prefix = '';
>
> width -= input.toString().length;
> - while (width > 1) {
> + while (width > 0) {
> prefix += str;
> width--;
> }--
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/