From: Sven Verdoolaege <skimo@kotnet.org>
To: VMiklos <vmiklos@frugalware.org>
Cc: Alex Riesen <raa.lkml@gmail.com>, git@vger.kernel.org
Subject: Re: question about git-submodule
Date: Sun, 15 Jul 2007 17:21:01 +0200 [thread overview]
Message-ID: <20070715152101.GJ999MdfPADPa@greensroom.kotnet.org> (raw)
In-Reply-To: <20070715150540.GH7106@genesis.frugalware.org>
On Sun, Jul 15, 2007 at 05:05:40PM +0200, VMiklos wrote:
> Hello,
>
> Na Sun, Jul 15, 2007 at 04:48:35PM +0200, Sven Verdoolaege <skimo@kotnet.org> pisal(a):
> > Isn't that what "git submodule update" does ?
>
> i can't get it to work, but here is a log:
>
> vmiklos@vmobile:~/git/test$ ls
> vmiklos@vmobile:~/git/test$ mkdir server
> vmiklos@vmobile:~/git/test$ cd server
> vmiklos@vmobile:~/git/test/server$ mkdir main
> vmiklos@vmobile:~/git/test/server$ cd main
> vmiklos@vmobile:~/git/test/server/main$ git init
> Initialized empty Git repository in .git/
> vmiklos@vmobile:~/git/test/server/main$ echo "foo" > main.c
> vmiklos@vmobile:~/git/test/server/main$ git add main.c
> vmiklos@vmobile:~/git/test/server/main$ git commit -m "import main"
> Created initial commit 1ceae8f: import main
> 1 files changed, 1 insertions(+), 0 deletions(-)
> create mode 100644 main.c
> vmiklos@vmobile:~/git/test/server/main$ cd ..
> vmiklos@vmobile:~/git/test/server$ mkdir libfoo
> vmiklos@vmobile:~/git/test/server$ cd libfoo
> vmiklos@vmobile:~/git/test/server/libfoo$ git init
> Initialized empty Git repository in .git/
> vmiklos@vmobile:~/git/test/server/libfoo$ echo "foo" > libfoo.c
> vmiklos@vmobile:~/git/test/server/libfoo$ git add libfoo.c
> vmiklos@vmobile:~/git/test/server/libfoo$ git commit -m "import libfoo"
> Created initial commit 5979d36: import libfoo
> 1 files changed, 1 insertions(+), 0 deletions(-)
> create mode 100644 libfoo.c
> vmiklos@vmobile:~/git/test/server/libfoo$ cd ../..
> vmiklos@vmobile:~/git/test$ mkdir client
> vmiklos@vmobile:~/git/test$ cd client
> vmiklos@vmobile:~/git/test/client$ git clone ../server/main
> Initialized empty Git repository in /home/vmiklos/git/test/client/main/.git/
> remote: Generating pack...
> Done counting 3 objects.
> Deltifying 3 objects...
> 100% (3/3) done
> Total 3 remote: (delta 0), reused 0 (delta 0)
> Indexing 3 objects...
> 100% (3/3) done
>
> vmiklos@vmobile:~/git/test/client$ cd main
> vmiklos@vmobile:~/git/test/client/main$ ls
> main.c
> vmiklos@vmobile:~/git/test/client/main$ git submodule add ../../server/libfoo/ libfoo
Here you add a submodule in the copy of the superproject in client.
> Initialized empty Git repository in /home/vmiklos/git/test/client/main/libfoo/.git/
> remote: Generating pack...
> remote: Done counting 3 objects.
> remote: Deltifying 3 objects...
> 100% (3/3) done
> Total 3 (delta 0), reused 0 (delta 0)
> Indexing 3 objects...
> 100% (3/3) done
>
> vmiklos@vmobile:~/git/test/client/main$ git submodule init
> Submodule 'libfoo' (/home/vmiklos/git/test/server/libfoo/.git) registered for path 'libfoo'
> vmiklos@vmobile:~/git/test/client/main$ git commit -a -m "registered libfoo submodule"
> Created commit 2c65310: registered libfoo submodule
> 2 files changed, 4 insertions(+), 0 deletions(-)
> create mode 100644 .gitmodules
> create mode 160000 libfoo
> vmiklos@vmobile:~/git/test/client/main$ cd ../../server/main
> vmiklos@vmobile:~/git/test/server/main$ echo bar >> main.c
> vmiklos@vmobile:~/git/test/server/main$ git add git commit -m "bar in main"
> vmiklos@vmobile:~/git/test/server/main$ git add main.c
> vmiklos@vmobile:~/git/test/server/main$ git commit -m "bar in main"
> Created commit 1c26399: bar in main
> 1 files changed, 1 insertions(+), 0 deletions(-)
> vmiklos@vmobile:~/git/test/server/main$ cd ../libfoo
> vmiklos@vmobile:~/git/test/server/libfoo$ echo bar >> libfoo.c
> vmiklos@vmobile:~/git/test/server/libfoo$ git add libfoo.c
> vmiklos@vmobile:~/git/test/server/libfoo$ git commit -m "bar in libfoo"
> Created commit 07ceadb: bar in libfoo
> 1 files changed, 1 insertions(+), 0 deletions(-)
> vmiklos@vmobile:~/git/test/server/libfoo$ cd ../../client/main
> vmiklos@vmobile:~/git/test/client/main$ git submodule update
>
> at the end of it, git submodule update does not pull anything, while
> there are changes both in the main and in the libfoo repo, too
The last time you told the superproject about any changes
in the subprojects was when you added the subproject (in client),
so as far as the superproject is concerned nothing happened
in any submodule. The submodules don't even exist in server.
skimo
next prev parent reply other threads:[~2007-07-15 15:21 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-13 21:46 question about git-submodule VMiklos
2007-07-15 8:39 ` Sven Verdoolaege
2007-07-15 10:47 ` Alex Riesen
2007-07-15 10:54 ` VMiklos
2007-07-15 13:50 ` Alex Riesen
2007-07-15 13:54 ` VMiklos
2007-07-15 14:02 ` Sven Verdoolaege
2007-07-15 14:26 ` VMiklos
2007-07-15 14:48 ` Sven Verdoolaege
2007-07-15 15:05 ` VMiklos
2007-07-15 15:21 ` Sven Verdoolaege [this message]
2007-07-15 15:40 ` VMiklos
2007-07-15 21:45 ` Sven Verdoolaege
2007-07-15 22:29 ` VMiklos
2007-07-16 10:39 ` Sven Verdoolaege
2007-07-16 11:07 ` VMiklos
2007-07-15 11:51 ` Sven Verdoolaege
2007-07-15 13:42 ` Alex Riesen
2007-07-15 13:52 ` Sven Verdoolaege
2007-08-03 23:01 ` Eran Tromer
2007-08-05 14:59 ` Sven Verdoolaege
2007-08-06 17:23 ` Eran Tromer
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=20070715152101.GJ999MdfPADPa@greensroom.kotnet.org \
--to=skimo@kotnet.org \
--cc=git@vger.kernel.org \
--cc=raa.lkml@gmail.com \
--cc=skimo@liacs.nl \
--cc=vmiklos@frugalware.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).