Re: [PATCH v3 01/10] submodule--helper: add is_active command
- From
Stefan Beller <sbeller@google.com>
- Date
- Mar 13, 2017, 22:36 UTC
- Message-ID
- <CAGZ79kY_hPYT8hEbQ-S6ahitfU2d1GHwCz44UKVCHgCSRpHy0g@mail.gmail.com>
- In-Reply-To
- <20170313214341.172676-2-bmwill@google.com>
On Mon, Mar 13, 2017 at 2:43 PM, Brandon Williams <bmwill@google.com> wrote:
> There are a lot of places where an explicit check for > submodule."<name>".url is done to see if a submodule exists. In order > to centralize this check introduce a helper which can be used to query > if a submodule is active or not.
With this patch in mind, I need to take notes for rerolling http://public-inbox.org/git/20170209020855.23486-1-sbeller@google.com/
> #define SUPPORT_SUPER_PREFIX (1<<0)
...
> + {"is-active", is_active, 0},I think you can even mark it as SUPPORT_SUPER_PREFIX. The only messages produced are from die()ing in git_config_get_string in is_submodule_initialized.
This alone doesn't warrant a reroll though; just in case you do reroll, this may be worth checking.