All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Lehmann <Jens.Lehmann@web.de>
To: Trevor Saunders <tbsaunde@tbsaunde.org>,
	Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Heiko Voigt <hvoigt@hvoigt.net>,
	Jonathan Nieder <jrnieder@gmail.com>
Subject: Re: [PATCH, RFC] checkout: Attempt to checkout submodules
Date: Mon, 23 Mar 2015 21:01:48 +0100	[thread overview]
Message-ID: <5510712C.5090906@web.de> (raw)
In-Reply-To: <20150320001345.GC21536@tsaunders-iceball.corp.tor1.mozilla.com>

Am 20.03.2015 um 01:13 schrieb Trevor Saunders:
> On Thu, Mar 19, 2015 at 02:15:19PM -0700, Junio C Hamano wrote:
>> Trevor Saunders <tbsaunde@tbsaunde.org> writes:
>> I have a feeling that an optional feature that allows "git submodule
>> update" to happen automatically from this codepath might be
>> acceptable by the submodule folks, and they might even say it does
>> not even have to be optional but should be enabled by default.
>
> ok, that seems fairly reasonable.  I do kind of wonder though if it
> shouldn't be 'git submodule update --checkout' but that would get us
> kind of back to where we started.  I guess since the default is checkout
> if you set the pref then you can be assumed to have some amount of idea
> what your doing.

Me thinks it should be "git checkout" for those submodules that have
their update setting set to 'checkout' (or not set at all). I'm not
sure yet if it makes sense to attempt a rebase or merge here, but that
can be added later if necessary.

>> But I do not think it would fly well to unconditionally run
>> "checkout -f" here.
>
> agreed

Using -f here is ok when you extend the appropriate verify functions
in unpack-trees.c to check that no modifications will be lost (unless
the original checkout is used with -f). See the commit 76dbdd62
("submodule: teach unpack_trees() to update submodules") in my github
repo at https://github.com/jlehmann/git-submod-enhancements for
the basic concept (There is already a fixup! for that a bit further
down the branch which handles submodule to file conversion, maybe one
or two other changes will be needed when the test suite covers all
relevant cases).

  reply	other threads:[~2015-03-23 20:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-18 12:27 [PATCH, RFC] checkout: Attempt to checkout submodules Trevor Saunders
2015-03-19 18:53 ` Junio C Hamano
2015-03-19 20:15   ` Trevor Saunders
2015-03-19 21:15     ` Junio C Hamano
2015-03-20  0:13       ` Trevor Saunders
2015-03-23 20:01         ` Jens Lehmann [this message]
2015-03-24 18:30           ` Trevor Saunders
2015-03-25 20:16             ` Jens Lehmann

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=5510712C.5090906@web.de \
    --to=jens.lehmann@web.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=hvoigt@hvoigt.net \
    --cc=jrnieder@gmail.com \
    --cc=tbsaunde@tbsaunde.org \
    /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.