git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] fix "git-submodule add a/b/c/repository"

From
SJSylvain Joyeux <sylvain.joyeux@dfki.de>
Date
Jul 7, 2008, 06:34 UTC
Message-ID
<20080707063424.GB5506@jhaampe.org>
In-Reply-To
<48711782.6090609@gmail.com>
On Sun, Jul 06, 2008 at 03:05:38PM -0400, Mark Levedahl wrote:
Show 14 quoted lines
> Sylvain Joyeux wrote:
>>  	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
>>   
> ...after some prep work...
>
> >git submodule add init dir0/dir1/init
> Adding existing repo at 'dir0/dir1/init' to the index
>
> So, what's the problem?
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")

[~/tmp/test]% git-submodule add dir0/dir1/init Initialize init/.git Initialized empty Git repository in /home/doudou/tmp/test/init/.git/

[~/tmp/test]% git status # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: .gitmodules # new file: init # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # dir0/

What it is supposed to do (according to the documentation) is register dir0/dir1/init as the submodule, not clone it and register init/.

Sylvain
Previous: Mark LevedahlNext: Mark Levedahl
Message 5 of 15 in “fix "git-submodule add a/b/c/repository"”
  1. fix "git-submodule add a/b/c/repository"Sylvain Joyeux, Jul 1, 2008
  2. Junio C HamanoJul 6, 2008
  3. Sylvain JoyeuxJul 6, 2008
  4. Mark LevedahlJul 6, 2008
  5. Sylvain JoyeuxJul 7, 2008
  6. Mark LevedahlJul 8, 2008
  7. Junio C HamanoJul 8, 2008
  8. Mark LevedahlJul 8, 2008
  9. Junio C HamanoJul 8, 2008
  10. Mark LevedahlJul 8, 2008
  11. git-submodule - make "submodule add" more strict, and document itMark Levedahl, Jul 9, 2008
  12. Junio C HamanoJul 9, 2008
  13. git-submodule - make "submodule add" more strict, and document itMark Levedahl, Jul 10, 2008
  14. git-submodule - register submodule URL if adding in placeMark Levedahl, Jul 10, 2008
  15. Sylvain JoyeuxJul 8, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.