Subject: Re: [PATCH v4 07/14] builtin/config: introduce "list" subcommand

From: Junio C Hamano <[email-masked]>
Date: Fri, 03 May 2024 09:01:06 -0700

<[email-masked]> writes:

>>> +DEPRECATED MODES
>>> +----------------
>>> +
>>> +The following modes have been deprecated in favor of subcommands. It
>>> +is recommended to migrate to the new syntax.
>>> +
>>> +-l::
>>> +--list::
>>> +	Replaced by `git config list`.

Can you trim quotes in your response that has no relevance to what
you are responding to?

> Removing the --list option is going to break backward
> compatibility for users who script the use of config for things
> like setup, clone automation, etc.

Yes, that is why this is merely a deprecation.

> Adding list as a sub-command could (but should not) cause
> ambiguities between a list and configuration value.

Because there is no sectionless variable, there exists no ambiguity.

In other words,

    $ git config list

cannot be asking for the value of the variable "list", because such
a variable cannot exist.  When you start your command with

    $ git config list ...

whatever other tokens follow that token "list" on the command line,
it is a "--list" subcommand.  A traditional and lazy "get a single
variable" without an explicit subcommand would look like

    $ git config section.variable

that is a short-hand to

    $ git config --get section.variable

and would become

    $ git config get section.variable

in the new world order.

Thanks.