git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v9 0/4] submodule: improve support for relative superproject origin URLs
@ 2012-06-06 11:57 Jon Seymour
  2012-06-06 11:57 ` [PATCH v9 1/4] submodule: additional regression tests for relative URLs Jon Seymour
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Jon Seymour @ 2012-06-06 11:57 UTC (permalink / raw)
  To: git; +Cc: Jens.Lehmann, gitster, phil.hord, ramsay, j6t, Jon Seymour

This series improves handling by 'git submodule' of relative superproject origin URLs. 

Currently, 'git submodule':

* incorrectly configures origin URL for submodules with a path that is relative to
the work tree of the superproject when the configured path needs to be relative 
to the work tree of the submodule

* unnecessarily fails with an error if the superproject origin URL is of the form: foo

This series corrects these problems for paths like the following:
  foo
  foo/bar
  ./foo
  ./foo/bar
  ../foo
  ../foo/bar

It does not change current behaviour for URLs that begin with a leading '/' or contain
a ':' as such URLs are deemed to be absolute URLs for which no correction is required.

In addition, this series ensures that relative URLs configured by git submodule do
not include a superfluous leading or embedded './'.

This series differs from v7 by removing the patches dealing incorrect handling 
of greedy submodule URLs (those with too many leading ../'s) and those that deal
with improperly normalized superproject origin URLs. These patches may resubmitted
at a later date.

This series differs from v8 by fixing the indentation of case branches, using 
a sed idiom that avoids a Solaris sed bug, and reverts the name of the 
'module_url' variable used by cmd_sync() to 'url'. The commentary for
resolve_relative_url is adjusted slightly to remove the implication that the 
first argument is always a relative URL.

Jon Seymour (4):
  submodule: additional regression tests for relative URLs
  submodule: document failure to handle relative superproject origin
    URLs
  submodule: fix sync handling of some relative superproject origin
    URLs
  submodule: fix handling of superproject origin URLs like foo, ./foo
    and ./foo/bar

 git-submodule.sh           |  60 +++++++++++++++++--
 t/t7400-submodule-basic.sh | 144 ++++++++++++++++++++++++++++++++++++++++++++-
 t/t7403-submodule-sync.sh  |  90 +++++++++++++++++++++++++++-
 3 files changed, 284 insertions(+), 10 deletions(-)

-- 
1.7.10.2.650.g9c513dd.dirty

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

end of thread, other threads:[~2012-06-06 11:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-06 11:57 [PATCH v9 0/4] submodule: improve support for relative superproject origin URLs Jon Seymour
2012-06-06 11:57 ` [PATCH v9 1/4] submodule: additional regression tests for relative URLs Jon Seymour
2012-06-06 11:57 ` [PATCH v9 2/4] submodule: document failure to handle relative superproject origin URLs Jon Seymour
2012-06-06 11:57 ` [PATCH v9 3/4] submodule: fix sync handling of some " Jon Seymour
2012-06-06 11:57 ` [PATCH v9 4/4] submodule: fix handling of superproject origin URLs like foo, ./foo and ./foo/bar Jon Seymour

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).