git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] builtin/init-db.c: fix a sparse warning

From
Ramsay Jones <ramsay@ramsayjones.plus.com>
Date
Aug 28, 2020, 20:46 UTC
Message-ID
<8d4b4011-b8a2-c0e0-a3f2-28c7bbec040b@ramsayjones.plus.com>
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
Next: Eric Sunshine
Message 1 of 2 in “builtin/init-db.c: fix a sparse warning”
  1. builtin/init-db.c: fix a sparse warningRamsay Jones, Aug 28, 2020
  2. Eric SunshineAug 28, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.