git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Chris Angelico <rosuav@gmail.com>
Cc: Kevin <ikke@ikke.info>, git <git@vger.kernel.org>
Subject: Re: Configuring a third-party git hook
Date: Thu, 20 Mar 2014 19:38:16 -0400	[thread overview]
Message-ID: <20140320233816.GC7774@sigill.intra.peff.net> (raw)
In-Reply-To: <CAPTjJmpAcmVGgJK8iUvFuXJq_ZukisRZ6OD9TM=feuxDYm5iPQ@mail.gmail.com>

On Fri, Mar 21, 2014 at 03:51:16AM +1100, Chris Angelico wrote:

> > 1. I would say yes. git config is made to be extended and doesn't
> > require a config item to be known.
> > 2. Namespacing the config items like you did is a good thing to do so
> > it won't interfere with other options.
> 
> Excellent! Thank you.
> 
> Is this documented anywhere? The git config man page says to look to
> other git man pages:
> 
> https://www.kernel.org/pub/software/scm/git/docs/git-config.html#_variables
> 
> A comment there to the effect that "Third party tools may also define
> their own variables" or something would make it clear that this is the
> intention.

I think this sentence from the section you linked is meant to express
that:

  You will find a description of non-core porcelain configuration
  variables in the respective porcelain documentation.

but it is rather opaque, isn't it? You did not know it, but your hook is
a non-core porcelain. :)

I think it could probably be re-worded, and possibly even indicate to
authors of other programs that they are free to make up their own
variables (but should take care with namespacing them appropriately).

Would you like to try your hand at writing a patch?

-Peff

  reply	other threads:[~2014-03-20 23:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-19 11:16 Configuring a third-party git hook Chris Angelico
2014-03-20 12:53 ` Kevin
2014-03-20 16:51   ` Chris Angelico
2014-03-20 23:38     ` Jeff King [this message]
2014-03-20 23:46       ` Chris Angelico
2014-03-21  3:43         ` Jeff King
2014-03-21  4:07           ` Chris Angelico
2014-03-21 17:31             ` Junio C Hamano
2014-03-21 17:48               ` Chris Angelico
2014-03-21 18:15               ` Jeff King
2014-03-21 18:53                 ` Junio C Hamano
2014-03-21 18:54                 ` Junio C Hamano
2014-03-20 16:53 ` Junio C Hamano
2014-03-20 17:10   ` Chris Angelico

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=20140320233816.GC7774@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=ikke@ikke.info \
    --cc=rosuav@gmail.com \
    /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).