From 109988f2cb00f78b746d05c40b8a8960bbb12ff8 Mon Sep 17 00:00:00 2001 From: Pavan Kumar Sunkara Date: Thu, 15 Jul 2010 12:59:01 +0530 Subject: [PATCH 1/3] gitweb: fix esc_url Earlier, 452e225 (gitweb: fix esc_param, 2009-10-13) fixed CGI escaping rules used in esc_url. A very similar logic exists in esc_param and needs to be fixed the same way. Signed-off-by: Pavan Kumar Sunkara Signed-off-by: Junio C Hamano --- gitweb/gitweb.perl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index c356e95f1..a97ce0344 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -1173,8 +1173,7 @@ sub esc_param { sub esc_url { my $str = shift; return undef unless defined $str; - $str =~ s/([^A-Za-z0-9\-_.~();\/;?:@&=])/sprintf("%%%02X", ord($1))/eg; - $str =~ s/\+/%2B/g; + $str =~ s/([^A-Za-z0-9\-_.~();\/;?:@&= ]+)/CGI::escape($1)/eg; $str =~ s/ /\+/g; return $str; } From 47dc5d5fda291bc399da54648ca27e8df4ddfd2c Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Thu, 15 Jul 2010 02:41:55 -0500 Subject: [PATCH 2/3] gitmodules.5: url can be a relative path There is already excellent documentation for this facility in git-submodule.1, but it is not so discoverable. Relative paths in .gitmodules can be useful for serving the same repository over multiple protocols, for example. Thanks to Peter for pointing this out. Cc: Peter Krefting Signed-off-by: Jonathan Nieder Acked-by: Johan Herland Signed-off-by: Junio C Hamano --- Documentation/gitmodules.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/gitmodules.txt b/Documentation/gitmodules.txt index 5daf750d1..72a13d18e 100644 --- a/Documentation/gitmodules.txt +++ b/Documentation/gitmodules.txt @@ -29,6 +29,9 @@ submodule..path:: submodule..url:: Defines an url from where the submodule repository can be cloned. + This may be either an absolute URL ready to be passed to + linkgit:git-clone[1] or (if it begins with ./ or ../) a location + relative to the superproject's origin repository. submodule..update:: Defines what to do when the submodule is updated by the superproject. From 0ad0a61f05fe521a63ade9bfafd2f589fba0df33 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Thu, 15 Jul 2010 02:51:19 -0500 Subject: [PATCH 3/3] Documentation: add submodule.* to the big configuration variable list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The url, path, and the update items in [submodule "foo"] stanzas are nicely explained in the .gitmodules and ‘git submodule’ documentation. Point there from the config documentation. Signed-off-by: Jonathan Nieder Acked-by: Johan Herland Signed-off-by: Junio C Hamano --- Documentation/config.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Documentation/config.txt b/Documentation/config.txt index 1029bc46c..eae06e7c3 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -1685,6 +1685,15 @@ status.submodulesummary:: summary of commits for modified submodules will be shown (see --summary-limit option of linkgit:git-submodule[1]). +submodule..path:: +submodule..url:: +submodule..update:: + The path within this project, URL, and the updating strategy + for a submodule. These variables are initially populated + by 'git submodule init'; edit them to override the + URL and other values found in the `.gitmodules` file. See + linkgit:git-submodule[1] and linkgit:gitmodules[5] for details. + tar.umask:: This variable can be used to restrict the permission bits of tar archive entries. The default is 0002, which turns off the