From: Junio C Hamano Date: Sat, 26 Mar 2011 00:57:08 +0000 (-0700) Subject: Sync with 1.7.4.2 X-Git-Tag: v1.7.5-rc0~25 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/421446b6fcf2c3767e7e714388163b29a65f45cc?hp=d6d9e76d7f06c5ba94517d258e051544885780c5 Sync with 1.7.4.2 Signed-off-by: Junio C Hamano --- diff --git a/Documentation/RelNotes/1.7.4.2.txt b/Documentation/RelNotes/1.7.4.2.txt index 991dae4811..ef4ce1fcd3 100644 --- a/Documentation/RelNotes/1.7.4.2.txt +++ b/Documentation/RelNotes/1.7.4.2.txt @@ -12,6 +12,10 @@ Fixes since v1.7.4.1 tiny packfiles. We now close the file descriptor early when the entire packfile fits inside one mmap window. + * "git bisect visualize" tried to run "gitk" in windowing + environments even when "gitk" is not installed, resulting in a + strange error message. + * "git clone /no/such/path" did not fail correctly. * "git commit" did not correctly error out when the user asked to use a @@ -45,6 +49,9 @@ Fixes since v1.7.4.1 * gitweb's "highlight" interface mishandled tabs. + * gitweb didn't understand timezones with GMT offset that is not + multiple of a whole hour. + * gitweb had a few forward-incompatible syntactic constructs and also used incorrect variable when showing the file mode in a diff. diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 0178633b26..ee69ea683a 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -2921,8 +2921,10 @@ sub parse_date { $date{'iso-8601'} = sprintf "%04d-%02d-%02dT%02d:%02d:%02dZ", 1900+$year, 1+$mon, $mday, $hour ,$min, $sec; - $tz =~ m/^([+\-][0-9][0-9])([0-9][0-9])$/; - my $local = $epoch + ((int $1 + ($2/60)) * 3600); + my ($tz_sign, $tz_hour, $tz_min) = + ($tz =~ m/^([-+])(\d\d)(\d\d)$/); + $tz_sign = ($tz_sign eq '-' ? -1 : +1); + my $local = $epoch + $tz_sign*((($tz_hour*60) + $tz_min)*60); ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday) = gmtime($local); $date{'hour_local'} = $hour; $date{'minute_local'} = $min;