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

[PATCH 1/2] builtin/init-db: rename to "builtin/init.c"

From
Patrick Steinhardt <ps@pks.im>
Date
Jun 1, 2026, 07:55 UTC
Message-ID
<20260601-pks-deprecate-git-init-db-v1-1-ea3e6eebe674@pks.im>
In-Reply-To
<20260601-pks-deprecate-git-init-db-v1-0-ea3e6eebe674@pks.im>

Rename "builtin/init-db.c" to "builtin/init.c" to match the modern git-init(1) command name instead of its ancient alias git-init-db(1).

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 Makefile                      | 4 ++--
 builtin.h                     | 2 +-
 builtin/{init-db.c => init.c} | 8 ++++----
 git.c                         | 4 ++--
 meson.build                   | 2 +-
 5 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/Makefile b/Makefile
index b31ecb0756..b03f74ee8c 100644
--- a/Makefile
+++ b/Makefile
@@ -894,7 +894,7 @@ BUILT_INS += git-cherry-pick$X
 BUILT_INS += git-format-patch$X
 BUILT_INS += git-format-rev$X
 BUILT_INS += git-fsck-objects$X
-BUILT_INS += git-init$X
+BUILT_INS += git-init-db$X
 BUILT_INS += git-maintenance$X
 BUILT_INS += git-merge-subtree$X
 BUILT_INS += git-restore$X
@@ -1428,7 +1428,7 @@ BUILTIN_OBJS += builtin/help.o
 BUILTIN_OBJS += builtin/history.o
 BUILTIN_OBJS += builtin/hook.o
 BUILTIN_OBJS += builtin/index-pack.o
-BUILTIN_OBJS += builtin/init-db.o
+BUILTIN_OBJS += builtin/init.o
 BUILTIN_OBJS += builtin/interpret-trailers.o
 BUILTIN_OBJS += builtin/last-modified.o
 BUILTIN_OBJS += builtin/log.o
diff --git a/builtin.h b/builtin.h
index 4e47a4ebd3..bd072aa0e4 100644
--- a/builtin.h
+++ b/builtin.h
@@ -200,7 +200,7 @@ int cmd_help(int argc, const char **argv, const char *prefix, struct repository
 int cmd_history(int argc, const char **argv, const char *prefix, struct repository *repo);
 int cmd_hook(int argc, const char **argv, const char *prefix, struct repository *repo);
 int cmd_index_pack(int argc, const char **argv, const char *prefix, struct repository *repo);
-int cmd_init_db(int argc, const char **argv, const char *prefix, struct repository *repo);
+int cmd_init(int argc, const char **argv, const char *prefix, struct repository *repo);
 int cmd_interpret_trailers(int argc, const char **argv, const char *prefix, struct repository *repo);
 int cmd_last_modified(int argc, const char **argv, const char *prefix, struct repository *repo);
 int cmd_log_reflog(int argc, const char **argv, const char *prefix, struct repository *repo);
diff --git a/builtin/init-db.c b/builtin/init.c
similarity index 98%
rename from builtin/init-db.c
rename to builtin/init.c
index c55517ad94..9184f2fc2c 100644
--- a/builtin/init-db.c
+++ b/builtin/init.c
@@ -69,10 +69,10 @@ static const char *const init_db_usage[] = {
  * On the other hand, it might just make lookup slower and messier. You
  * be the judge.  The default case is to have one DB per managed directory.
  */
-int cmd_init_db(int argc,
-		const char **argv,
-		const char *prefix,
-		struct repository *repo UNUSED)
+int cmd_init(int argc,
+	     const char **argv,
+	     const char *prefix,
+	     struct repository *repo UNUSED)
 {
 	char *git_dir;
 	const char *real_git_dir = NULL;
diff --git a/git.c b/git.c
index 36f08891ef..a72394b599 100644
--- a/git.c
+++ b/git.c
@@ -590,8 +590,8 @@ static struct cmd_struct commands[] = {
 	{ "history", cmd_history, RUN_SETUP },
 	{ "hook", cmd_hook, RUN_SETUP_GENTLY },
 	{ "index-pack", cmd_index_pack, RUN_SETUP_GENTLY | NO_PARSEOPT },
-	{ "init", cmd_init_db },
-	{ "init-db", cmd_init_db },
+	{ "init", cmd_init },
+	{ "init-db", cmd_init },
 	{ "interpret-trailers", cmd_interpret_trailers, RUN_SETUP_GENTLY },
 	{ "last-modified", cmd_last_modified, RUN_SETUP },
 	{ "log", cmd_log, RUN_SETUP },
diff --git a/meson.build b/meson.build
index 064fe2e2f1..682e46e7eb 100644
--- a/meson.build
+++ b/meson.build
@@ -634,7 +634,7 @@ builtin_sources = [
   'builtin/history.c',
   'builtin/hook.c',
   'builtin/index-pack.c',
-  'builtin/init-db.c',
+  'builtin/init.c',
   'builtin/interpret-trailers.c',
   'builtin/last-modified.c',
   'builtin/log.c',
-- 
2.54.0.926.g75ba10bac6.dirty
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 2 of 20 in “Deprecate git-init-db(1) alias”
  1. 0/2 Deprecate git-init-db(1) aliasPatrick Steinhardt, Jun 1, 2026
  2. 1/2 builtin/init-db: rename to "builtin/init.c"Patrick Steinhardt, Jun 1, 2026
  3. 2/2 builtin/init-db: deprecate alias for git-init(1)Patrick Steinhardt, Jun 1, 2026
  4. Kristoffer HaugsbakkJun 1, 2026
  5. Patrick SteinhardtJun 1, 2026
  6. Phillip WoodJun 1, 2026
  7. Patrick SteinhardtJun 1, 2026
  8. Kristoffer HaugsbakkJun 1, 2026
  9. Junio C HamanoJun 1, 2026
  10. Patrick SteinhardtJun 2, 2026
  11. Kristoffer HaugsbakkJun 2, 2026
  12. Patrick SteinhardtJun 2, 2026
  13. Junio C HamanoJun 2, 2026
  14. Patrick SteinhardtJun 2, 2026
  15. Phillip WoodJun 2, 2026
  16. Patrick SteinhardtJun 2, 2026
  17. SZEDER GáborJun 2, 2026
  18. Junio C HamanoJun 1, 2026
  19. Phillip WoodJun 2, 2026
  20. Junio C HamanoJun 2, 2026

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.