From: Sylvain Joyeux <sylvain.joyeux@dfki.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: Lars Hjemli <hjemli@gmail.com>, Ping Yin <pkufranky@gmail.com>,
Mark Levedahl <mlevedahl@gmail.com>,
git@vger.kernel.org
Subject: Re: [PATCH] fix "git-submodule add a/b/c/repository"
Date: Sun, 6 Jul 2008 18:11:01 +0200 [thread overview]
Message-ID: <20080706161101.GB23385@jhaampe.org> (raw)
In-Reply-To: <7vd4lro7ct.fsf@gitster.siamese.dyndns.org>
> > +test_expect_success 'adding an already-existing repository deep in the directory hierarchy' '
> > +
> > + mkdir dir0 &&
> > + mkdir dir0/dir1 &&
> > + git clone init dir0/dir1/init &&
> > + git-submodule add dir0/dir1/init &&
> > + git-submodule status | grep "dir0/dir1/init"
> > +'
>
> I am not sure if this is fixing a sane use case. "submodule add" is
> documented to take:
>
> 'git submodule' [--quiet] add [-b branch] [--] <repository> [<path>]
>
> and you are adding at dir0/dir1/init a submodule that will interact with "init"
> repository, so shouldn't that command line be something like:
>
> git submodule add init dir0/dir1/init
git submodule add dir0/dir1/init
Is supposed to add the repository already checked-out in dir0/dir1/init as a
submodule, at the same location.
git submodule add init dir0/dir1/init
Would clone dir0/dir1/init at ./init and add ./init as a submodule. This is
actually what the current git-submodule (wrongly) does.
Sylvain
next prev parent reply other threads:[~2008-07-06 16:37 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 [this message]
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
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=20080706161101.GB23385@jhaampe.org \
--to=sylvain.joyeux@dfki.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=hjemli@gmail.com \
--cc=mlevedahl@gmail.com \
--cc=pkufranky@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).