All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
To: Bagas Sanjaya <bagasdotme@gmail.com>
Cc: Git Users <git@vger.kernel.org>
Subject: Re: [QUESTION] How to add new configuration variable
Date: Fri, 17 Sep 2021 09:43:18 -0400	[thread overview]
Message-ID: <20210917134318.scdqa6k4swzgo5k2@meerkat.local> (raw)
In-Reply-To: <9f3cc3f0-36db-f7e5-de1d-2c8c9f246884@gmail.com>

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

-K

  reply	other threads:[~2021-09-17 13:43 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 [this message]
2021-09-17 15:20   ` Đoàn Trần Công Danh
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=20210917134318.scdqa6k4swzgo5k2@meerkat.local \
    --to=konstantin@linuxfoundation.org \
    --cc=bagasdotme@gmail.com \
    --cc=git@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.