Thread (121 messages) flat view 121 messages, 8 authors, 2022-02-16

Re: [PATCH v3 3/6] worktree: add 'init-worktree-config' subcommand

From: Eric Sunshine <hidden>
Date: 2021-12-29 06:48:57

On Tue, Dec 28, 2021 at 4:32 PM Derrick Stolee via GitGitGadget
[off-list ref] 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...
quoted hunk ↗ jump to hunk
Signed-off-by: Derrick Stolee <redacted>
---
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 } };
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help