All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Heiko Voigt <hvoigt@hvoigt.net>
Cc: Fredrik Gustafsson <iveqy@iveqy.com>,
	git@vger.kernel.org, Jens Lehmann <jens.lehmann@web.de>
Subject: Re: [PATCH] [submodule] Add depth to submodule update
Date: Wed, 26 Jun 2013 09:16:32 -0700	[thread overview]
Message-ID: <7vli5wyhi7.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20130625221132.GB4161@sandbox-ub> (Heiko Voigt's message of "Wed, 26 Jun 2013 00:11:32 +0200")

Heiko Voigt <hvoigt@hvoigt.net> writes:

> On Tue, Jun 25, 2013 at 12:49:25AM +0200, Fredrik Gustafsson wrote:
>> Used only when a clone is initialized. This is useful when the submodule(s)
>> are huge and you're not really interested in anything but the latest commit.
>> 
>> Signed-off-by: Fredrik Gustafsson <iveqy@iveqy.com>
>
> I this is a valid use case. But this option only makes sense when a
> submodule is newly cloned so I am not sure whether submodule update is
> the correct place. Let me think about this a little more. Since we do
> not have any extra command that initiates the clone this is probably the
> only place we can put this option. But at the moment it does not feel
> completely right.

I could imagine why people would not want to truncate the history
when they "submodule update" a submodule that has been already
initialized and cloned long time ago, but the new option is ignored
in the patch for an already cloned module, so that is not a problem.

The only possible confusion factor I can see is that the option is
ignored silently, but I do not think it is a grave enough offence to
error out when the user says "git submodule update --depth=N $path"
for a submodule at $path that has already been cloned.  It may not
even deserve a wraning, so in that sense the patch may be fine as-is.

> Apart from that the code looks good. If the user does a checkout of a
> revision that was not fetched submodule update will error out the same
> way as if someone forgot to push his submodule changes. So that should
> not be a problem.

True.

Thanks.

      parent reply	other threads:[~2013-06-26 16:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-23  8:04 [RFC] [submodule] Add depth to submodule update Fredrik Gustafsson
2013-06-24 22:49 ` [PATCH] " Fredrik Gustafsson
2013-06-25  5:07   ` Junio C Hamano
2013-06-25 22:11   ` Heiko Voigt
2013-06-26 16:02     ` Fredrik Gustafsson
2013-06-26 21:03       ` Junio C Hamano
2013-06-27 14:54         ` Jens Lehmann
2013-06-28  6:50           ` Heiko Voigt
2013-06-28 18:44             ` Junio C Hamano
2013-06-28 20:54               ` Jens Lehmann
2013-06-28 22:51                 ` Junio C Hamano
2013-06-28 23:07                   ` Fredrik Gustafsson
2013-06-30 19:17                     ` Junio C Hamano
2013-06-26 16:16     ` Junio C Hamano [this message]

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=7vli5wyhi7.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=hvoigt@hvoigt.net \
    --cc=iveqy@iveqy.com \
    --cc=jens.lehmann@web.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.