git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ping Yin" <pkufranky@gmail.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com, "Ping Yin" <pkufranky@gmail.com>
Subject: Re: [PATCH 6/7] git-submodule: multi-level module definition
Date: Fri, 14 Mar 2008 22:20:38 +0800	[thread overview]
Message-ID: <46dff0320803140720h619107c6v83ef1a3d13866fb9@mail.gmail.com> (raw)
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:

>  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

  parent reply	other threads:[~2008-03-14 14:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-13 17:56 [PATCH 0/7] git-submodule enhancements Ping Yin
2008-03-13 17:56 ` [PATCH 1/7] git-submodule: Avoid 'fatal: cannot describe' message Ping Yin
2008-03-13 17:56   ` [PATCH 2/7] git-submodule: Extract functions module_info and module_url Ping Yin
2008-03-13 17:56     ` [PATCH 3/7] git-submodule: Extract absolute_url & move absolute url logic to module_clone Ping Yin
2008-03-13 17:56       ` [PATCH 4/7] git-submodule: Fall back on .gitmodules if info not found in $GIT_DIR/config Ping Yin
2008-03-13 17:56         ` [PATCH 5/7] git-submodule: Extract module_add from cmd_add Ping Yin
2008-03-13 17:56           ` [PATCH 6/7] git-submodule: multi-level module definition Ping Yin
2008-03-13 17:56             ` [PATCH 7/7] git-submodule: Don't die when command fails for one submodule Ping Yin
2008-03-14 14:20             ` Ping Yin [this message]
2008-03-13 18:16 ` [PATCH 0/7] git-submodule enhancements Ping Yin

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=46dff0320803140720h619107c6v83ef1a3d13866fb9@mail.gmail.com \
    --to=pkufranky@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).