git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bill Zaumen <bill.zaumen+git@gmail.com>
To: git@vger.kernel.org
Subject: Possible submodule or submodule documentation issue
Date: Tue, 27 Dec 2011 11:24:19 -0800	[thread overview]
Message-ID: <1325013859.1987.65.camel@yos> (raw)

For the 'add' command, the man page for get-submodule states

"<repository> is the URL of the new submodule’s origin repository. This
may be either an absolute URL, or (if it begins with ./ or ../), the
location relative to the superproject’s origin repository."

and

"In either case, the given URL is recorded into .gitmodules for use by
subsequent users cloning the superproject. If the URL is given relative
to the superproject’s repository, the presumption is the superproject
and submodule repositories will be kept together in the same relative
location, and only the superproject’s URL needs to be provided:
git-submodule will correctly locate the submodule using the relative URL
in .gitmodules."

Based on that documentation, I tried the following sequence of commands:

git init --bare library.git
git init --bare library-pkg.git
git clone library.git
cd library;
echo hello > hello
git add hello
git commit -m "initial"
git push origin master
cd ..
git clone library-pkg.git
echo goodbye > goodbye
git add goodbye
git submodule add ./library.git src   <FAILS>
git submodule add ../library.git src  <WORKS>
git commit -a -m "initial pkg"
git push origin master

The documentation as written suggests that the first use of 
"git submodule add" is the one that should have worked because
library.git is in the same directory as the origin repository
library-pgk.git .  I didn't try moving the two .git directories
to a server to see if the behavior is the same in that case (my
test was using the local file system).

git --version  reports 1.7.1  (current version for my linux
distribution).

             reply	other threads:[~2011-12-27 19:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-27 19:24 Bill Zaumen [this message]
2011-12-28 19:47 ` Possible submodule or submodule documentation issue Jens Lehmann
2011-12-29  2:50   ` Bill Zaumen
2012-01-01 15:13     ` Jens Lehmann
2012-01-02  3:53       ` Bill Zaumen
2012-01-03 20:48       ` Junio C Hamano

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=1325013859.1987.65.camel@yos \
    --to=bill.zaumen+git@gmail.com \
    --cc=git@vger.kernel.org \
    /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).