git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Imran M Yousuf" <imyousuf@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Added initialize and update support for submodule in git clone
Date: Mon, 07 Jan 2008 22:19:26 -0800	[thread overview]
Message-ID: <7vr6gsx2j5.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <7bfdc29a0801071922h3656a576wbd87e84bfa663d5a@mail.gmail.com> (Imran M. Yousuf's message of "Tue, 8 Jan 2008 09:22:18 +0600")

"Imran M Yousuf" <imyousuf@gmail.com> writes:

> This patch adds support for initializing and updating submodules when
> a repo is cloned. The advantage it adds is, the user actually does not
> have to know whether it has a module or not and if it does to what
> depth and path. For this I added a option -w or --with-submodule for
> initializing and updating during clone stage.

For everything else, I strongly agree [*1*] that the notion that
all subprojects are populated is a bug.  I am not convinced the
all-or-nothing approach you implemented in "git clone" is useful
outside small toy projects where all of your users are almost
always interested in everything (which inevitably invites a very
valid question: why use submodule at all then?), but in the very
narrow special case of "clone", all-or-nothing is the best you
can do without giving additional hints somewhere in-tree
(perhaps enhanced .gitmodules entries), and it certainly is
better than "you do not have any choice --- you only get the
toplevel".

> Following is the diff with git-clone 1.5.3.7; I also attached the diff
> and modified file in the attachment.

The same comment as diff plus attachment applies to this patch
as the other message.  Also please do not base new development
on 4-digit maintenance releases, which are meant to contain only
bugfixes and no new features.  A patch like this, primarily for
discussion and not for immediate inclusion, is Ok, but it is
better to get into the habit of producing applicable patches
earlier rather than later.

I'll step aside and let others discuss code and design of the
patch.

[Reference]

*1* http://thread.gmane.org/gmane.comp.version-control.git/44106/focus=44308

  reply	other threads:[~2008-01-08  6:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-08  3:22 [PATCH] Added initialize and update support for submodule in git clone Imran M Yousuf
2008-01-08  6:19 ` Junio C Hamano [this message]
2008-01-09  6:05   ` Imran M Yousuf

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=7vr6gsx2j5.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=imyousuf@gmail.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).