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

Re: [PATCH 6/7] git-submodule: multi-level module definition

From
Ping Yin <pkufranky@gmail.com>
Date
Mar 14, 2008, 14:20 UTC
Message-ID
<46dff0320803140720h619107c6v83ef1a3d13866fb9@mail.gmail.com>
In-Reply-To
<1205431001-18590-7-git-send-email-pkufranky@gmail.com>
On Fri, Mar 14, 2008 at 1:56 AM, Ping Yin <pkufranky@gmail.com> wrote:
Show 11 quoted lines
>  In the no "--module-name" form, the path parameter may be not the real
>  submodule path, and it just acts as the filter for real submodule paths.
>  While in the "--module-name" form, the name parameter must be the logical
>  name, and the real paths corresponding to the logical name may be neither
>  a submodule path nor even existent.
>
>  This patch handles such a path for different subcommands as follows.
>
>   - status: Output 0{40} as the sha1. Doing this can remind the user to
>    add the path as submodule or delete the path from .gitmodules.
>   - update: Skip that path and issue a "Not a submodule" warning

Sometime it's useful to also update (or clone) the non-submodule instead of "Not as submodule" warning. So we can add a --force option to allow this kind of behaviour.

There are cases that we want to clone a group of repositories in batch.

One way is to put all urls and paths of these repositories in .gitmodules which form a submodule group, for example "all", and then run "git submodule --module-name update --force all" which will clone all the repositories in batch even if they are not submodules yet.

Another way is use the "git submodule --module-name recurse clone" (recurse patch series sent many days ago but not accept yet). But this needs some discuss since we have no place for the module group name "all" as the argument.

There may be other ways. i don't know which way is better and don't care much now. What i care is whether the submodule subcommand should operate on the non-submodule path.

More precisely, with --module-name, we can designate a group of names by a logical group name. However, some paths corresponding to these names may not be submodules yet. So should the submodule subcommands (especially update for now) operate on these paths?

-- 
Ping Yin
Previous: Ping YinNext: Ping Yin
Message 9 of 10 in “git-submodule enhancements”
  1. 0/7 git-submodule enhancementsPing Yin, Mar 13, 2008
  2. 1/7 git-submodule: Avoid 'fatal: cannot describe' messagePing Yin, Mar 13, 2008
  3. 2/7 git-submodule: Extract functions module_info and module_urlPing Yin, Mar 13, 2008
  4. 3/7 git-submodule: Extract absolute_url & move absolute url logic to module_clonePing Yin, Mar 13, 2008
  5. 4/7 git-submodule: Fall back on .gitmodules if info not found in $GIT_DIR/configPing Yin, Mar 13, 2008
  6. 5/7 git-submodule: Extract module_add from cmd_addPing Yin, Mar 13, 2008
  7. 6/7 git-submodule: multi-level module definitionPing Yin, Mar 13, 2008
  8. 7/7 git-submodule: Don't die when command fails for one submodulePing Yin, Mar 13, 2008
  9. Ping YinMar 14, 2008
  10. Ping YinMar 13, 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.