From: Junio C Hamano Date: Wed, 15 Dec 2010 19:47:40 +0000 (-0800) Subject: Git 1.7.3.4 X-Git-Tag: v1.7.3.4^0 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/fa1c8542cb3ed2a193aac2e514ebe12d7fe22a04?ds=inline;hp=-c Git 1.7.3.4 Signed-off-by: Junio C Hamano --- fa1c8542cb3ed2a193aac2e514ebe12d7fe22a04 diff --combined Documentation/RelNotes/1.7.3.4.txt index c2a46a2e96,0000000000..e57f7c176d mode 100644,000000..100644 --- a/Documentation/RelNotes/1.7.3.4.txt +++ b/Documentation/RelNotes/1.7.3.4.txt @@@ -1,42 -1,0 +1,45 @@@ +Git v1.7.3.4 Release Notes +========================== + +Fixes since v1.7.3.3 +-------------------- + + * Smart HTTP transport used to incorrectly retry redirected POST + request with GET request. + + * "git apply" did not correctly handle patches that only change modes + if told to apply while stripping leading paths with -p option. + + * "git apply" can deal with patches with timezone formatted with a + colon between the hours and minutes part (e.g. "-08:00" instead of + "-0800"). + + * "git checkout" removed an untracked file "foo" from the working + tree when switching to a branch that contains a tracked path + "foo/bar". Prevent this, just like the case where the conflicting + path were "foo" (c752e7f..7980872d). + + * "git cherry-pick" or "git revert" refused to work when a path that + would be modified by the operation was stat-dirty without a real + difference in the contents of the file. + + * "git diff --check" reported an incorrect line number for added + blank lines at the end of file. + + * "git imap-send" failed to build under NO_OPENSSL. + + * Setting log.decorate configuration variable to "0" or "1" to mean + "false" or "true" did not work. + + * "git push" over dumb HTTP protocol did not work against WebDAV + servers that did not terminate a collection name with a slash. + + * "git tag -v" did not work with GPG signatures in rfc1991 mode. + + * The post-receive-email sample hook was accidentally broken in 1.7.3.3 + update. + ++ * "gitweb" can sometimes be tricked into parrotting a filename argument ++ given in a request without properly quoting. ++ +Other minor fixes and documentation updates are also included. diff --combined GIT-VERSION-GEN index 702306acd2,ec4c49a90d..d40b287e5a --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@@ -1,7 -1,7 +1,7 @@@ #!/bin/sh GVF=GIT-VERSION-FILE - DEF_VER=v1.7.3.3 -DEF_VER=v1.7.2.5 ++DEF_VER=v1.7.3.4 LF=' ' diff --combined gitweb/gitweb.perl index e645d4a821,8b8ab29607..53253c622d --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@@ -7,7 -7,6 +7,7 @@@ # # This program is licensed under the GPLv2 +use 5.008; use strict; use warnings; use CGI qw(:standard :escapeHTML -nosticky); @@@ -233,29 -232,6 +233,29 @@@ our %avatar_size = # Leave it undefined (or set to 'undef') to turn off load checking. our $maxload = 300; +# configuration for 'highlight' (http://www.andre-simon.de/) +# match by basename +our %highlight_basename = ( + #'Program' => 'py', + #'Library' => 'py', + 'SConstruct' => 'py', # SCons equivalent of Makefile + 'Makefile' => 'make', +); +# match by extension +our %highlight_ext = ( + # main extensions, defining name of syntax; + # see files in /usr/share/highlight/langDefs/ directory + map { $_ => $_ } + qw(py c cpp rb java css php sh pl js tex bib xml awk bat ini spec tcl), + # alternate extensions, see /etc/highlight/filetypes.conf + 'h' => 'c', + map { $_ => 'cpp' } qw(cxx c++ cc), + map { $_ => 'php' } qw(php3 php4), + map { $_ => 'pl' } qw(perl pm), # perhaps also 'cgi' + 'mak' => 'make', + map { $_ => 'xml' } qw(xhtml html htm), +); + # You define site-wide feature defaults here; override them with # $GITWEB_CONFIG as necessary. our %feature = ( @@@ -1061,12 -1037,8 +1061,12 @@@ sub run_request reset_timer(); evaluate_uri(); + evaluate_gitweb_config(); check_loadavg(); + # $projectroot and $projects_list might be set in gitweb config file + $projects_list ||= $projectroot; + evaluate_query_params(); evaluate_path_info(); evaluate_and_validate_params(); @@@ -1114,8 -1086,12 +1114,8 @@@ sub evaluate_argv sub run { evaluate_argv(); - evaluate_gitweb_config(); evaluate_git_version(); - # $projectroot and $projects_list might be set in gitweb config file - $projects_list ||= $projectroot; - $pre_listen_hook->() if $pre_listen_hook; @@@ -1126,7 -1102,7 +1126,7 @@@ run_request(); - $pre_dispatch_hook->() + $post_dispatch_hook->() if $post_dispatch_hook; last REQUEST if ($is_last_request->()); @@@ -1356,6 -1332,13 +1356,13 @@@ sub esc_url return $str; } + # quote unsafe characters in HTML attributes + sub esc_attr { + + # for XHTML conformance escaping '"' to '"' is not enough + return esc_html(@_); + } + # replace invalid utf8 character with SUBSTITUTION sequence sub esc_html { my $str = shift; @@@ -1761,7 -1744,7 +1768,7 @@@ sub format_ref_marker hash=>$dest )}, $name); - $markers .= " " . + $markers .= " " . $link . ""; } } @@@ -1845,7 -1828,7 +1852,7 @@@ sub git_get_avatar return $pre_white . "" . $post_white; } else { @@@ -2556,7 -2539,7 +2563,7 @@@ sub git_show_project_tagcloud } else { my @tags = sort { $cloud->{$a}->{count} <=> $cloud->{$b}->{count} } keys %$cloud; return '

' . join (', ', map { - "$cloud->{$_}->{topname}" + $cgi->a({-href=>"$home_link?by_tag=$_"}, $cloud->{$_}->{topname}) } splice(@tags, 0, $count)) . '

'; } } @@@ -3340,6 -3323,30 +3347,6 @@@ sub blob_contenttype sub guess_file_syntax { my ($highlight, $mimetype, $file_name) = @_; return undef unless ($highlight && defined $file_name); - - # configuration for 'highlight' (http://www.andre-simon.de/) - # match by basename - my %highlight_basename = ( - #'Program' => 'py', - #'Library' => 'py', - 'SConstruct' => 'py', # SCons equivalent of Makefile - 'Makefile' => 'make', - ); - # match by extension - my %highlight_ext = ( - # main extensions, defining name of syntax; - # see files in /usr/share/highlight/langDefs/ directory - map { $_ => $_ } - qw(py c cpp rb java css php sh pl js tex bib xml awk bat ini spec tcl), - # alternate extensions, see /etc/highlight/filetypes.conf - 'h' => 'c', - map { $_ => 'cpp' } qw(cxx c++ cc), - map { $_ => 'php' } qw(php3 php4), - map { $_ => 'pl' } qw(perl pm), # perhaps also 'cgi' - 'mak' => 'make', - map { $_ => 'xml' } qw(xhtml html htm), - ); - my $basename = basename($file_name, '.in'); return $highlight_basename{$basename} if exists $highlight_basename{$basename}; @@@ -3429,11 -3436,11 +3436,11 @@@ EO # print out each stylesheet that exist, providing backwards capability # for those people who defined $stylesheet in a config file if (defined $stylesheet) { - print ''."\n"; + print ''."\n"; } else { foreach my $stylesheet (@stylesheets) { next unless $stylesheet; - print ''."\n"; + print ''."\n"; } } if (defined $project) { @@@ -3446,7 -3453,7 +3453,7 @@@ my $type = lc($format); my %link_attr = ( '-rel' => 'alternate', - '-title' => "$project - $href_params{'-title'} - $format feed", + '-title' => esc_attr("$project - $href_params{'-title'} - $format feed"), '-type' => "application/$type+xml" ); @@@ -3473,13 -3480,13 +3480,13 @@@ } else { printf(''."\n", - $site_name, href(project=>undef, action=>"project_index")); + esc_attr($site_name), href(project=>undef, action=>"project_index")); printf(''."\n", - $site_name, href(project=>undef, action=>"opml")); + esc_attr($site_name), href(project=>undef, action=>"opml")); } if (defined $favicon) { - print qq(\n); + print qq(\n); } print "\n" . @@@ -3492,7 -3499,7 +3499,7 @@@ print "
\n" . $cgi->a({-href => esc_url($logo_url), -title => $logo_label}, - qq()); + qq()); print $cgi->a({-href => esc_url($home_link)}, $home_link_str) . " / "; if (defined $project) { print $cgi->a({-href => href(action=>"summary")}, esc_html($project)); @@@ -3590,7 -3597,7 +3597,7 @@@ sub git_footer_html insert_file($site_footer); } - print qq!\n!; + print qq!\n!; if (defined $action && $action eq 'blame_incremental') { print qq!