From: Eric Sunshine Date: Wed, 29 Dec 2021 06:48:45 GMT Subject: Re: [PATCH v3 3/6] worktree: add 'init-worktree-config' subcommand Message-ID: In-Reply-To: On Tue, Dec 28, 2021 at 4:32 PM Derrick Stolee via GitGitGadget 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... > Signed-off-by: Derrick Stolee > --- > 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 } };