From: "Dana How" <danahow@gmail.com>
To: "Git Mailing List" <git@vger.kernel.org>,
"Junio C Hamano" <junkio@cox.net>,
danahow@gmail.com
Subject: [RFC] Default options
Date: Wed, 9 May 2007 15:15:15 -0700 [thread overview]
Message-ID: <56b7f5510705091515l7c7090b9rd5599e8746642ef9@mail.gmail.com> (raw)
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
next reply other threads:[~2007-05-09 22:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-09 22:15 Dana How [this message]
2007-05-09 23:07 ` [RFC] Default options Johannes Schindelin
2007-05-09 23:14 ` Matthieu Moy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56b7f5510705091515l7c7090b9rd5599e8746642ef9@mail.gmail.com \
--to=danahow@gmail.com \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox