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().