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

Re: [PATCH 2/2] builtin/init-db: deprecate alias for git-init(1)

From
KHKristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>
Date
Jun 1, 2026, 09:31 UTC
Message-ID
<276a92ac-b2cb-4a89-96d0-9071ab6200be@app.fastmail.com>
In-Reply-To
<20260601-pks-deprecate-git-init-db-v1-2-ea3e6eebe674@pks.im>
On Mon, Jun 1, 2026, at 09:56, Patrick Steinhardt wrote:
Show 28 quoted lines
> The git-init-db(1) command was initially only initializing the object
> database of a Git repository. This has changed over time so that the
> command also initializes all the other data structures, which is why we
> have eventually introduced git-init(1) as a more aptly named replacement
> for it.
>
> This has all happened in 2007 already, and with 5c94f87e6b (use 'init'
> instead of 'init-db' for shipped docs and tools, 2007-01-12) we have
> also adapted all user-facing documentation to mention the replacement.
> It is thus safe to assume that (almost) nobody uses git-init-db(1)
> nowadays anymore.
>
> Deprecate the command in favor of git-init(1) and wire up the removal
> when compiling Git with breaking changes enabled.
>
> Signed-off-by: Patrick Steinhardt <ps@pks.im>
> ---
>[snip]
> diff --git a/git.c b/git.c
> index a72394b599..6bf6a60360 100644
> --- a/git.c
> +++ b/git.c
> @@ -591,7 +591,9 @@ static struct cmd_struct commands[] = {
>  	{ "hook", cmd_hook, RUN_SETUP_GENTLY },
>  	{ "index-pack", cmd_index_pack, RUN_SETUP_GENTLY | NO_PARSEOPT },
>  	{ "init", cmd_init },
> +#ifndef WITH_BREAKING_CHANGES
>  	{ "init-db", cmd_init },
This can be marked as deprecated.
	{ "init-db", cmd_init, DEPRECATED },
Show 5 quoted lines
> +#endif
>  	{ "interpret-trailers", cmd_interpret_trailers, RUN_SETUP_GENTLY },
>  	{ "last-modified", cmd_last_modified, RUN_SETUP },
>  	{ "log", cmd_log, RUN_SETUP },
>[snip]
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 4 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.