{"thread":{"id":"54155","subject":"[PATCH] builtin/init-db.c: fix a sparse warning","startedAt":"2020-08-28T20:47:00Z","lastAt":"2020-08-28T22:21:07Z","messageCount":2,"participants":["Ramsay Jones","Eric Sunshine"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"404726","messageId":"8d4b4011-b8a2-c0e0-a3f2-28c7bbec040b@ramsayjones.plus.com","threadId":"54155","inReplyTo":null,"subject":"[PATCH] builtin/init-db.c: fix a sparse warning","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2020-08-28T20:46:52Z","receivedAt":"2020-08-28T20:47:00Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nSigned-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>\n---\n\nHi Eric,\n\nIf you need to re-roll your 'es/worktree-repair' branch, could you\nplease squash this into the relevant patch (commit 44a466ca7f (init:\nmake --separate-git-dir work from within linked worktree, 27-08-2020)).\n\nThanks!\n\nATB,\nRamsay Jones\n\n builtin/init-db.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/builtin/init-db.c b/builtin/init-db.c\nindex 6a94d20a2e..cd3e760541 100644\n--- a/builtin/init-db.c\n+++ b/builtin/init-db.c\n@@ -661,7 +661,7 @@ int cmd_init_db(int argc, const char **argv, const char *prefix)\n \t\t\tif (chdir(mainwt.buf) < 0)\n \t\t\t\tdie_errno(_(\"cannot chdir to %s\"), mainwt.buf);\n \t\t\tstrbuf_release(&mainwt);\n-\t\t\tgit_dir = strbuf_detach(&sb, 0);\n+\t\t\tgit_dir = strbuf_detach(&sb, NULL);\n \t\t}\n \t\tstrbuf_release(&sb);\n \t}\n-- \n2.28.0\n"},{"id":"404737","messageId":"CAPig+cQxjYA_LdbaGYOCACPSn=DhpFA-+5tb76BxnveT66w45A@mail.gmail.com","threadId":"54155","inReplyTo":"8d4b4011-b8a2-c0e0-a3f2-28c7bbec040b@ramsayjones.plus.com","subject":"Re: [PATCH] builtin/init-db.c: fix a sparse warning","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2020-08-28T22:20:53Z","receivedAt":"2020-08-28T22:21:07Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Fri, Aug 28, 2020 at 4:47 PM Ramsay Jones\n<ramsay@ramsayjones.plus.com> wrote:\n> If you need to re-roll your 'es/worktree-repair' branch, could you\n> please squash this into the relevant patch (commit 44a466ca7f (init:\n> make --separate-git-dir work from within linked worktree, 27-08-2020)).\n>\n> -                       git_dir = strbuf_detach(&sb, 0);\n> +                       git_dir = strbuf_detach(&sb, NULL);\n\nThanks. I misremembered the purpose of the second argument, thinking\nthat it was a size hint which would be passed along to strbuf_init().\n"}]}