{"thread":{"id":"53644","subject":"[PATCH] builtin/worktree.c: fix a sparse '0 as NULL pointer' warning","startedAt":"2020-06-09T23:52:55Z","lastAt":"2020-06-10T04:15:29Z","messageCount":2,"participants":["Ramsay Jones","Eric Sunshine"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"399378","messageId":"89e22af5-227f-7a38-372a-af2fe7d42be2@ramsayjones.plus.com","threadId":"53644","inReplyTo":null,"subject":"[PATCH] builtin/worktree.c: fix a sparse '0 as NULL pointer' warning","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2020-06-09T23:52:48Z","receivedAt":"2020-06-09T23:52:55Z","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-duplicate-paths' branch, could you\nplease squash this into the relevant patch (commit 71806ee9e8 (worktree: prune\nlinked worktree referencing main worktree path, 2020-06-08)).\n\nNote that this is based on top of the 'pu' branch, and Junio has a fixup\npatch (commit 4b01d684fe (SQUASH??? -Werror=main, 2020-06-08)) which also\nchanges this line of code (s/main/main_path/).\n\nThanks!\n\nATB,\nRamsay Jones\n\n builtin/worktree.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/builtin/worktree.c b/builtin/worktree.c\nindex 7762333228..2d8540bdae 100644\n--- a/builtin/worktree.c\n+++ b/builtin/worktree.c\n@@ -199,7 +199,7 @@ static void prune_worktrees(void)\n \tstrbuf_add_absolute_path(&main_path, get_git_common_dir());\n \t/* massage main worktree absolute path to match 'gitdir' content */\n \tstrbuf_strip_suffix(&main_path, \"/.\");\n-\tstring_list_append(&kept, strbuf_detach(&main_path, 0));\n+\tstring_list_append(&kept, strbuf_detach(&main_path, NULL));\n \tprune_dups(&kept);\n \tstring_list_clear(&kept, 1);\n \n-- \n2.27.0\n"},{"id":"399386","messageId":"CAPig+cTF+pwBasVCzmucXmMZcm1K0ctkGOavj7bMcGsw2MvoKw@mail.gmail.com","threadId":"53644","inReplyTo":"89e22af5-227f-7a38-372a-af2fe7d42be2@ramsayjones.plus.com","subject":"Re: [PATCH] builtin/worktree.c: fix a sparse '0 as NULL pointer' warning","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2020-06-10T04:15:14Z","receivedAt":"2020-06-10T04:15:29Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Tue, Jun 9, 2020 at 7:53 PM Ramsay Jones <ramsay@ramsayjones.plus.com> wrote:\n> If you need to re-roll your 'es/worktree-duplicate-paths' branch, could you\n> please squash this into the relevant patch (commit 71806ee9e8 (worktree: prune\n> linked worktree referencing main worktree path, 2020-06-08)).\n\nThanks, I'll apply this change when I re-roll.\n\n> Note that this is based on top of the 'pu' branch, and Junio has a fixup\n> patch (commit 4b01d684fe (SQUASH??? -Werror=main, 2020-06-08)) which also\n> changes this line of code (s/main/main_path/).\n\nIndeed, I saw Junio's SQUASH and was planning on applying that, as well.\n"}]}