Re: [PATCH 02/10] git-submodule.sh: dispatch "sync" to helper
- From
Glen Choo <chooglen@google.com>
- Date
- Oct 20, 2022, 20:42 UTC
- Message-ID
- <kl6l1qr2z0ok.fsf@chooglen-macbookpro.roam.corp.google.com>
- In-Reply-To
- <patch-02.10-46bf600820b-20221017T115544Z-avarab@gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 6 quoted lines
> Remove the cmd_sync() wrapper for "git submodule--helper sync" in > favor of dispatching the raw command-line directly to the helper. > > At this point we've already parsed out the optional "--quiet" flag > that we need to support for "git submodule --quiet" (as opposed to > "git submodule <subcommand> --quiet").
For a moment, I thought this was saying that we're dropping support for "git submodule <subcommand> --quiet" in favor of "git submodule --quiet", but that's not true. Both are still supported, albeit in slightly different ways:
- The subcommand "--quiet" flag is passed via $@
- The top level "--quiet" flag is parsed when we parse top level flags, which sets quiet=1, and thus passes "--quiet" to submodule--helper. We also `shift` out the "--quiet" so there's no fear of passing "--quiet" twice.
Hooray!