From: "Đoàn Trần Công Danh" <congdanhqx@gmail.com>
To: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Cc: Bagas Sanjaya <bagasdotme@gmail.com>, Git Users <git@vger.kernel.org>
Subject: Re: [QUESTION] How to add new configuration variable
Date: Fri, 17 Sep 2021 22:20:43 +0700 [thread overview]
Message-ID: <YUSyNqd51euzvt8N@danh.dev> (raw)
In-Reply-To: <20210917134318.scdqa6k4swzgo5k2@meerkat.local>
On 2021-09-17 09:43:18-0400, Konstantin Ryabitsev <konstantin@linuxfoundation.org> wrote:
> On Fri, Sep 17, 2021 at 05:44:42PM +0700, Bagas Sanjaya wrote:
> > Supposed that I'm writing git-foobar script ("git-foobar.sh"), which takes
> > configuration variable "foobar.something" (string type).
> >
> > How can I add that configuration variable so that it can be used by the
> > script?
>
> You can just add it. :) Git doesn't complain when it finds configuration
> parameters it doesn't know anything about, it just ignores them.
>
> E.g. in your .gitconfig or individual repository .git/config:
>
> [foobar]
> something = yourvalue
Or just:
git config [--global] foobar.something yourvalue
--
Danh
next prev parent reply other threads:[~2021-09-17 15:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-17 10:44 [QUESTION] How to add new configuration variable Bagas Sanjaya
2021-09-17 13:43 ` Konstantin Ryabitsev
2021-09-17 15:20 ` Đoàn Trần Công Danh [this message]
2021-09-17 20:02 ` Junio C Hamano
2021-09-17 16:21 ` Carlo Arenas
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=YUSyNqd51euzvt8N@danh.dev \
--to=congdanhqx@gmail.com \
--cc=bagasdotme@gmail.com \
--cc=git@vger.kernel.org \
--cc=konstantin@linuxfoundation.org \
/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;
as well as URLs for NNTP newsgroup(s).