Re: submodule update --force
- From
- Stefan Zager <szager@google.com>
- Date
- May 10, 2012, 07:20 UTC
- Message-ID
- <CAHOQ7J_6+sfU6egjvVSPj-FAS6zjSUT=a057=kz_wYbogHLMMA@mail.gmail.com>
- In-Reply-To
- <7vk40kpnia.fsf@alter.siamese.dyndns.org>
On Wed, May 9, 2012 at 11:18 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 15 quoted lines
> If we follow that line of thought, it may make more sense not to implement > your feature like the above patch, but instead make it so > > if the user told us never to recurse > then > nothing > elif the user told us to always recurse || > subsha1 != sha1 > then > do the "recurse" thing > fi > > so that you can still force it recurse into the submodule, even when you > do not necessarily want the "force checkout" thing to happen to clobber > the working tree.
I'm a bit confused by your use of the term recursion here. It sounds like you consider any operation run on a submodule to be a form of recursion, which is not the way I think about it. To my mind, any `git submodule` command should *always* run on the first level of submodules. If you're going to specify --no-recurse, then why are you running `git submodule` at all? I think 'recursion' only applies to moving beyond the first level of submodules.
I think your solution would work for our project, because we only use one level of submodules. But IMO the functionality, as you have written it, is less generally useful.
Stefan