Re: [PATCH v3 3/6] worktree: add 'init-worktree-config' subcommand
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Dec 29, 2021, 06:48 UTC
- Message-ID
- <CAPig+cRO4CZj4VQSwsNqDEeUFxnCyER31VRdU9B8CQw_hayEgg@mail.gmail.com>
- In-Reply-To
- <e2a0a458115a26cfb855f7040f15e5198072b3a5.1640727143.git.gitgitgadget@gmail.com>
On Tue, Dec 28, 2021 at 4:32 PM Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com> wrote:
> [...] > To help resolve this transition, create the 'git worktree > init-worktree-config' helper. This new subcommand does the following: > [...]
Like my not-a-proper-review of [6/6], this also is not a proper review...
Show 7 quoted lines
> Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
> ---
> diff --git a/builtin/worktree.c b/builtin/worktree.c
> @@ -1031,6 +1032,85 @@ static int repair(int ac, const char **av, const char *prefix)
> +static int init_worktree_config(int ac, const char **av, const char *prefix)
> +{
> + struct config_set cs = { 0 };On macOS with "Apple LLVM version 10.0.0 (clang-1000.10.44.4)" and DEVELOPER=1, the above code breaks the build:
builtin/worktree.c:1093:27: error: suggest braces around
initialization of subobject [-Werror,-Wmissing-braces]
struct config_set cs = { 0 };It wants extra braces in the initializer. This fixes it:
struct config_set cs = { { 0 } };