git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jon Seymour <jon.seymour@gmail.com>
To: git@vger.kernel.org
Cc: Jens.Lehmann@web.de, gitster@pobox.com, phil.hord@gmail.com,
	ramsay@ramsay1.demon.co.uk, j6t@kdbg.org,
	Jon Seymour <jon.seymour@gmail.com>
Subject: [PATCH v8 0/4] submodule: improve support for relative superproject origin URLs
Date: Sun,  3 Jun 2012 19:46:46 +1000	[thread overview]
Message-ID: <1338716810-9881-1-git-send-email-jon.seymour@gmail.com> (raw)

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.

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           |  65 +++++++++++++++++---
 t/t7400-submodule-basic.sh | 144 ++++++++++++++++++++++++++++++++++++++++++++-
 t/t7403-submodule-sync.sh  |  90 +++++++++++++++++++++++++++-
 3 files changed, 287 insertions(+), 12 deletions(-)

-- 
1.7.10.2.652.gdffd412

             reply	other threads:[~2012-06-03  9:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-03  9:46 Jon Seymour [this message]
2012-06-03  9:46 ` [PATCH v8 1/4] submodule: additional regression tests for relative URLs Jon Seymour
2012-06-03  9:46 ` [PATCH v8 2/4] submodule: document failure to handle relative superproject origin URLs Jon Seymour
2012-06-03  9:46 ` [PATCH v8 3/4] submodule: fix sync handling of some " Jon Seymour
2012-06-03 22:10   ` Junio C Hamano
2012-06-03 23:52     ` Jon Seymour
2012-06-05 21:18   ` Jens Lehmann
2012-06-05 22:49     ` Junio C Hamano
2012-06-06 11:09       ` Jon Seymour
2012-06-03  9:46 ` [PATCH v8 4/4] submodule: fix handling of superproject origin URLs like foo, ./foo and ./foo/bar Jon Seymour

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1338716810-9881-1-git-send-email-jon.seymour@gmail.com \
    --to=jon.seymour@gmail.com \
    --cc=Jens.Lehmann@web.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j6t@kdbg.org \
    --cc=phil.hord@gmail.com \
    --cc=ramsay@ramsay1.demon.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).