[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