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
Junio C Hamano <gitster@pobox.com>
Date
Jun 2, 2026, 13:50 UTC
Message-ID
<xmqq5x41vypg.fsf@gitster.g>
In-Reply-To
<336a4202-a55f-4223-b654-985d47233653@gmail.com>
Phillip Wood <phillip.wood123@gmail.com> writes:
Show 12 quoted lines
>> I was wondering whether we want to call `you_still_use_that()` here. I
>> found it to be a bit heavy-handed as it's so trivial to replace with
>> git-init(1), but on the other hand it's a trivial thing to do.
>
> I agree you_still_use_that() is too heavy handed, I was thinking of 
> something like
>
> 	warning(_("this command is deprecated, please use \"git init\""
> 		  "instead");
>
> but that would mean we need to add a separate cmd_init_db() function 
> that prints the warning and then calls cmd_init().

If we do plan to remove it in the future, then something like that may be needed.

But it is not like having "init-db" hidden but accessible in the command table is hurting anything. Other than that those who want to create their own

    [alias "init-db"] command = foo
that is, and I'd see it a bit crazy.

The "init-db" form is hidden from "git help" listing, and we know whenever we suggest to run "git init" we do not say "git init-db", so if we do not have to remove it in the future, I do not think we even need such a warning().

Previous: Phillip Wood
Message 20 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.