All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Keeping <john@keeping.me.uk>
To: Phil Hord <phil.hord@gmail.com>
Cc: Heiko Voigt <hvoigt@hvoigt.net>,
	Jens Lehmann <Jens.Lehmann@web.de>,
	Junio C Hamano <gitster@pobox.com>,
	"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Re: Re: What's cooking in git.git (May 2013, #09; Wed, 29)
Date: Wed, 5 Jun 2013 09:19:02 +0100	[thread overview]
Message-ID: <20130605081901.GQ1072@serenity.lan> (raw)
In-Reply-To: <CABURp0qPt8S4WWhjb22qEJwnUOoT7SFr9=cZBv3Syp-uEX-ycg@mail.gmail.com>

On Tue, Jun 04, 2013 at 06:57:34PM -0400, Phil Hord wrote:
> On Tue, Jun 4, 2013 at 8:48 AM, John Keeping <john@keeping.me.uk> wrote:
> > The problem is that sometimes you do want to adjust the path and
> > sometimes you don't.  Reading git-submodule(1), it says:
> >
> >      This may be either an absolute URL, or (if it begins with ./ or
> >      ../), the location relative to the superproject’s origin
> >      repository.
> >      [snip]
> >      If the superproject doesn’t have an origin configured the
> >      superproject is its own authoritative upstream and the current
> >      working directory is used instead.
> >
> > So I think it's quite reasonable to have a server layout that looks like
> > this:
> >
> >     project
> >     |- libs
> >     |  |- libA
> >     |  `- libB
> >     |- core.git
> >
> > and with only core.git on your local system do:
> >
> >     cd core/libs
> >     git submodule add ../libs/libB
> >
> > expecting that to point to libB.  But if we adjust the path then the
> > user has to do:
> >
> >     git submodule add ../../libs/libB
> >
> > However, it is also perfectly reasonable to have no remote configured
> > and the library next to the repository itself.  In which case we do want
> > to specify the additional "../" so that shell completion works in the
> > natural way.
> 
> In submodule add, the leading '../' prefix on the repository url has
> always meant that the url is relative to the url of the current repo.
> The given repo-url is precisely what ends up in .gitmodules'
> submodule.$name.url.  It works this way whether there is a remote
> configured or not.
> 
> It does seem like we need to be cautious around this change.
> 
> > The only way I can see to resolve the ambiguity is to die when we hit
> > this particular case.  This should be acceptable because people
> > shouldn't be adding new submodules anywhere near as often as they
> > perform other submodule operations and it doesn't affect absolute URLs.
> 
> I don't think I like that.  But I don't know if I like anything I
> dreamed up, either.

I've decided that I will make it die (unless anyone comes up with an
obviously correct solution before I get around to sending the reroll)
because it's a lot easier to loosen that in the future than to change it
if we get the behaviour wrong now.  I don't want to hold every other
subcommand hostage to this one case.

  reply	other threads:[~2013-06-05  8:19 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-29 23:58 What's cooking in git.git (May 2013, #09; Wed, 29) Junio C Hamano
2013-05-30  9:47 ` Thomas Rast
2013-05-30  9:56   ` Ramkumar Ramachandra
2013-06-02 23:44   ` Junio C Hamano
2013-05-30 19:18 ` Jens Lehmann
2013-06-02 18:50   ` Junio C Hamano
2013-06-03 21:27     ` Jens Lehmann
2013-07-01 22:05       ` Junio C Hamano
2013-05-30 19:23 ` Jens Lehmann
2013-05-31 19:40   ` John Keeping
2013-06-03 14:54     ` John Keeping
2013-06-03 15:30       ` Junio C Hamano
2013-06-03 21:47     ` Jens Lehmann
2013-06-03 22:23       ` John Keeping
2013-06-04  5:29         ` Heiko Voigt
2013-06-04  8:10           ` John Keeping
2013-06-04 11:17             ` Heiko Voigt
2013-06-04 12:48               ` John Keeping
2013-06-04 21:39                 ` Jens Lehmann
2013-06-04 22:04                   ` John Keeping
2013-06-04 22:57                 ` Re: " Phil Hord
2013-06-05  8:19                   ` John Keeping [this message]
2013-05-31  6:16 ` Øystein Walle

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=20130605081901.GQ1072@serenity.lan \
    --to=john@keeping.me.uk \
    --cc=Jens.Lehmann@web.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=hvoigt@hvoigt.net \
    --cc=phil.hord@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.