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

Re: [PATCH, RFC] checkout: Attempt to checkout submodules

From
TSTrevor Saunders <tbsaunde@tbsaunde.org>
Date
Mar 24, 2015, 18:30 UTC
Message-ID
<20150324183013.GA15658@tsaunders-iceball.corp.tor1.mozilla.com>
In-Reply-To
<5510712C.5090906@web.de>
On Mon, Mar 23, 2015 at 09:01:48PM +0100, Jens Lehmann wrote:
Show 18 quoted lines
> 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.
sgtm
Show 14 quoted lines
> >>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).

ah, I see your already working a more complete solution to this sort of issue. I'll get out of your way then unless you want help.

Trev
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous: Jens LehmannNext: Jens Lehmann
Message 7 of 8 in “checkout: Attempt to checkout submodules”
  1. checkout: Attempt to checkout submodulesTrevor Saunders, Mar 18, 2015
  2. Junio C HamanoMar 19, 2015
  3. Trevor SaundersMar 19, 2015
  4. Junio C HamanoMar 19, 2015
  5. Trevor SaundersMar 20, 2015
  6. Jens LehmannMar 23, 2015
  7. Trevor SaundersMar 24, 2015
  8. Jens LehmannMar 25, 2015

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.