# [RFC] Default options

3 messages from 2007-05-09 to 2007-05-09. Participants: Dana How, Johannes Schindelin, Matthieu Moy.
Thread: https://gitlist.dev/t/8059

## Dana How, 2007-05-09 22:15

Subject: [RFC] Default options
Message-ID: <56b7f5510705091515l7c7090b9rd5599e8746642ef9@mail.gmail.com>
URL: https://gitlist.dev/e/56b7f5510705091515l7c7090b9rd5599e8746642ef9%40mail.gmail.com

```
Reading the exchange about new options to e.g.
git gc and git pack-objects over the last few days,
a pattern seemed to emerge.  A new option would be
proposed,  but then we didn't always want to type it,
so a corresponding config variable would be added as well.

I notice git supports "alias.*" config variables.
Would it be useful to also support "options.*" variables?
When you type
    git gc <args>
this is interpreted as
    git gc $(git config options.gc) <args>
so anything in options.gc could be overridden
by later appearing on the command line.
The names might have dashes:
pack-objects would use options.pack-objects .

If a command is recognized using alias.*,
options.* would not be consulted (to keep things simple).
In other words, options.* only work for built-ins.
options.* would interpret quoting etc in its
value the same way alias.* does.

Thus,  you can add a new --option to a program,
and get a corresponding config variable automatically,
and without cluttering up the documentation.

I've not yet looked at the git driver code.
Is there any interest in this feature?

Thanks,
-- 
Dana L. How  danahow@gmail.com  +1 650 804 5991 cell

```

## Johannes Schindelin, 2007-05-09 23:07

Subject: Re: [RFC] Default options
Message-ID: <Pine.LNX.4.64.0705100106250.4167@racer.site>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0705100106250.4167%40racer.site
In-Reply-To: <56b7f5510705091515l7c7090b9rd5599e8746642ef9@mail.gmail.com>

```
Hi,

On Wed, 9 May 2007, Dana How wrote:

> I notice git supports "alias.*" config variables.
> Would it be useful to also support "options.*" variables?

I would not do it, for the same reason we do not allow to override 
builtins via aliases: it breaks scripts.

Ciao,
Dscho

```

## Matthieu Moy, 2007-05-09 23:14

Subject: Re: [RFC] Default options
Message-ID: <vpqvef1si7b.fsf@bauges.imag.fr>
URL: https://gitlist.dev/e/vpqvef1si7b.fsf%40bauges.imag.fr
In-Reply-To: <Pine.LNX.4.64.0705100106250.4167@racer.site>

```
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

> Hi,
>
> On Wed, 9 May 2007, Dana How wrote:
>
>> I notice git supports "alias.*" config variables.
>> Would it be useful to also support "options.*" variables?
>
> I would not do it, for the same reason we do not allow to override 
> builtins via aliases: it breaks scripts.

In any case, I find it a bit redundant with the alias section.

If I want to be able to quickly type "git-cmd --some --option", I'll
just alias it to something shorter.

-- 
Matthieu

```
