git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Lehmann <Jens.Lehmann@web.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jon Seymour <jon.seymour@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH v4 1/2] submodule: document handling of relative superproject origin URLs
Date: Wed, 23 May 2012 23:45:05 +0200	[thread overview]
Message-ID: <4FBD5A61.1030101@web.de> (raw)
In-Reply-To: <7vvcjmzjkv.fsf@alter.siamese.dyndns.org>

Am 23.05.2012 23:14, schrieb Junio C Hamano:
> Jens Lehmann <Jens.Lehmann@web.de> writes:
>> Am 23.05.2012 18:45, schrieb Jon Seymour:
>>> These tests document how submodule sync and init handle various
>>> kinds of relative super project origin URLs.  The submodule URL
>>> path is ../subrepo.
>>>
>>> 6 cases are documented:
>>>   foo
>>>   foo/bar
>>>   ./foo
>>>   ./foo/bar
>>>   ../foo
>>>   ../foo/bar
>>
>> Nice test coverage!
> 
> I recall correctly, the original use case for relative URL entries in the
> .gitmodules file (to be copied to .git/config as submodule.$name.path) was
> so that by looking at the top-level, the locations of the origins for
> submodule repositories can be known from where the top-level was cloned.
> The above cases do not seem to be relevant, so in the sense, they are of
> secondary importance (and I do not find the "sneakernet tool" example
> convincing---the sneakernet tool that is distributed in the scenario can
> be written differently so that it does not require the other repositories
> to be named relative to it).

Remember this patch series is not about relative /submodule/ urls but
relative /superproject/ urls, so the .gitmodules file is not involved
here. But while reviewing 2/2 I started to suspect I was a bit too hasty
judging the coverage, as I realized only "git submodule init" and "git
submodule sync" are tested. "git submodule add" should also be tested
here to make sure it behaves well too (and only when the tests cases are
not split across two commits they can be properly reviewed). My remark
aimed at the attempt to test all possible relative paths in at least two
depths, which I deem very helpful to find problems early.

> As long as you and submodule stakeholders believe this is a reasonable
> addition and does not break the existing use cases, I am perfectly fine
> with it, though.

Me thinks relative /superproject/ urls starting with ./ or ../ should
work just fine (which they don't right now). And if relative superproject
urls inside the superproject are handled too without too much hassle I
won't argue against it, even though I'm not convinced of the use case
either.

  reply	other threads:[~2012-05-23 21:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-23 16:45 [PATCH v4 0/2] submodule: fix handling of relative superproject origin URLs Jon Seymour
2012-05-23 16:45 ` [PATCH v4 1/2] submodule: document " Jon Seymour
2012-05-23 20:58   ` Jens Lehmann
2012-05-23 21:14     ` Junio C Hamano
2012-05-23 21:45       ` Jens Lehmann [this message]
2012-05-23 21:55       ` Jon Seymour
2012-05-23 16:45 ` [PATCH v4 2/2] submodule: fix " Jon Seymour
2012-05-23 21:50   ` Jens Lehmann
2012-05-23 22:17     ` Jon Seymour
2012-05-24  2:32       ` 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=4FBD5A61.1030101@web.de \
    --to=jens.lehmann@web.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jon.seymour@gmail.com \
    /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).