From: Ramsay Jones <ramsay@ramsayjones.plus.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: Junio C Hamano <gitster@pobox.com>,
GIT Mailing-list <git@vger.kernel.org>
Subject: [PATCH] builtin/worktree.c: fix a sparse '0 as NULL pointer' warning
Date: Wed, 10 Jun 2020 00:52:48 +0100 [thread overview]
Message-ID: <89e22af5-227f-7a38-372a-af2fe7d42be2@ramsayjones.plus.com> (raw)
Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---
Hi Eric,
If you need to re-roll your 'es/worktree-duplicate-paths' branch, could you
please squash this into the relevant patch (commit 71806ee9e8 (worktree: prune
linked worktree referencing main worktree path, 2020-06-08)).
Note that this is based on top of the 'pu' branch, and Junio has a fixup
patch (commit 4b01d684fe (SQUASH??? -Werror=main, 2020-06-08)) which also
changes this line of code (s/main/main_path/).
Thanks!
ATB,
Ramsay Jones
builtin/worktree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/worktree.c b/builtin/worktree.c
index 7762333228..2d8540bdae 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -199,7 +199,7 @@ static void prune_worktrees(void)
strbuf_add_absolute_path(&main_path, get_git_common_dir());
/* massage main worktree absolute path to match 'gitdir' content */
strbuf_strip_suffix(&main_path, "/.");
- string_list_append(&kept, strbuf_detach(&main_path, 0));
+ string_list_append(&kept, strbuf_detach(&main_path, NULL));
prune_dups(&kept);
string_list_clear(&kept, 1);
--
2.27.0
next reply other threads:[~2020-06-09 23:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-09 23:52 Ramsay Jones [this message]
2020-06-10 4:15 ` [PATCH] builtin/worktree.c: fix a sparse '0 as NULL pointer' warning Eric Sunshine
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=89e22af5-227f-7a38-372a-af2fe7d42be2@ramsayjones.plus.com \
--to=ramsay@ramsayjones.plus.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=sunshine@sunshineco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).