git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Mark Levedahl <mlevedahl@gmail.com>
Cc: Sylvain Joyeux <sylvain.joyeux@dfki.de>,
	Lars Hjemli <hjemli@gmail.com>, Ping Yin <pkufranky@gmail.com>,
	git@vger.kernel.org
Subject: Re: [PATCH] fix "git-submodule add a/b/c/repository"
Date: Mon, 07 Jul 2008 19:42:29 -0700	[thread overview]
Message-ID: <7v7ibxxfje.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <4872CF86.5050702@gmail.com> (Mark Levedahl's message of "Mon, 07 Jul 2008 22:23:02 -0400")

Mark Levedahl <mlevedahl@gmail.com> writes:

> Sylvain Joyeux wrote:
>>
>> Redo the prep work, the clone and now
>>
>> git submodule add dir0/dir1/init
>>
>> (i.e. don't expect dir0/dir1/init to be the clone of ./init, that was just a
>> shortcut for the test. Expect it to be a clone of "something, somewhere")
>>
>>
> Per the man-page,
>    git submodule [--quiet] add [-b branch] [--] <repository> [<path>]
>
> which means, that the *repository* url is mandatory, the path is
> optional. What you specifically asked git-submodule to do was to
> *clone* from dir0/dir1/init, and because you gave no path to put the
> submodule in, git-submodule deduced the name as "init", and cloned to
> there.

I'd like to hear clarifications on two counts, please?

 (1) If Sylvain wanted to have that appear at dir0/dir1/init not init,
     would it have been sufficient to give that path twice (once for
     <repository> and another for <path> parameter) to make things work as
     expected?

 (2) Is it generally considered a sane use case to specify an existing
     repository inside the working tree of a superproject as a submodule
     using "git submodule add" like Sylvain's example did?

     I would have understood if the command were "git add dir0/dir1/init",
     but I have this vague recolleciton that "git submodule add" is about
     telling our repository about a submodule that comes from _outside_.

  reply	other threads:[~2008-07-08  2:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-01 15:00 [PATCH] fix "git-submodule add a/b/c/repository" Sylvain Joyeux
2008-07-06  6:27 ` Junio C Hamano
2008-07-06 16:11   ` Sylvain Joyeux
2008-07-06 19:05     ` Mark Levedahl
2008-07-07  6:34       ` Sylvain Joyeux
2008-07-08  2:23         ` Mark Levedahl
2008-07-08  2:42           ` Junio C Hamano [this message]
2008-07-08  3:26             ` Mark Levedahl
2008-07-08  6:02               ` Junio C Hamano
2008-07-08 23:57                 ` Mark Levedahl
2008-07-09  3:59                 ` [PATCH] git-submodule - make "submodule add" more strict, and document it Mark Levedahl
2008-07-09  6:04                   ` Junio C Hamano
2008-07-10  1:05                     ` Mark Levedahl
2008-07-10  1:05                       ` [PATCH] git-submodule - register submodule URL if adding in place Mark Levedahl
2008-07-08  8:08               ` [PATCH] fix "git-submodule add a/b/c/repository" Sylvain Joyeux

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=7v7ibxxfje.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=hjemli@gmail.com \
    --cc=mlevedahl@gmail.com \
    --cc=pkufranky@gmail.com \
    --cc=sylvain.joyeux@dfki.de \
    /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).