git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] builtin/init-db.c: fix a sparse warning
@ 2020-08-28 20:46 Ramsay Jones
  2020-08-28 22:20 ` Eric Sunshine
  0 siblings, 1 reply; 2+ messages in thread
From: Ramsay Jones @ 2020-08-28 20:46 UTC (permalink / raw)
  To: Eric Sunshine; +Cc: GIT Mailing-list


Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---

Hi Eric,

If you need to re-roll your 'es/worktree-repair' branch, could you
please squash this into the relevant patch (commit 44a466ca7f (init:
make --separate-git-dir work from within linked worktree, 27-08-2020)).

Thanks!

ATB,
Ramsay Jones

 builtin/init-db.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/builtin/init-db.c b/builtin/init-db.c
index 6a94d20a2e..cd3e760541 100644
--- a/builtin/init-db.c
+++ b/builtin/init-db.c
@@ -661,7 +661,7 @@ int cmd_init_db(int argc, const char **argv, const char *prefix)
 			if (chdir(mainwt.buf) < 0)
 				die_errno(_("cannot chdir to %s"), mainwt.buf);
 			strbuf_release(&mainwt);
-			git_dir = strbuf_detach(&sb, 0);
+			git_dir = strbuf_detach(&sb, NULL);
 		}
 		strbuf_release(&sb);
 	}
-- 
2.28.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] builtin/init-db.c: fix a sparse warning
  2020-08-28 20:46 [PATCH] builtin/init-db.c: fix a sparse warning Ramsay Jones
@ 2020-08-28 22:20 ` Eric Sunshine
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Sunshine @ 2020-08-28 22:20 UTC (permalink / raw)
  To: Ramsay Jones; +Cc: GIT Mailing-list

On Fri, Aug 28, 2020 at 4:47 PM Ramsay Jones
<ramsay@ramsayjones.plus.com> wrote:
> If you need to re-roll your 'es/worktree-repair' branch, could you
> please squash this into the relevant patch (commit 44a466ca7f (init:
> make --separate-git-dir work from within linked worktree, 27-08-2020)).
>
> -                       git_dir = strbuf_detach(&sb, 0);
> +                       git_dir = strbuf_detach(&sb, NULL);

Thanks. I misremembered the purpose of the second argument, thinking
that it was a size hint which would be passed along to strbuf_init().

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-28 22:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-28 20:46 [PATCH] builtin/init-db.c: fix a sparse warning Ramsay Jones
2020-08-28 22:20 ` Eric Sunshine

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).