All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ramsay Jones <ramsay@ramsayjones.plus.com>
To: larsxschneider@gmail.com, git@vger.kernel.org
Cc: sschuberth@gmail.com, peff@peff.net
Subject: Re: [PATCH v2] config: add '--sources' option to print the source of a config value
Date: Wed, 10 Feb 2016 12:47:19 +0000	[thread overview]
Message-ID: <56BB3157.7080307@ramsayjones.plus.com> (raw)
In-Reply-To: <1455099198-11515-1-git-send-email-larsxschneider@gmail.com>



On 10/02/16 10:13, larsxschneider@gmail.com wrote:
> From: Lars Schneider <larsxschneider@gmail.com>
> 
> If config values are queried using 'git config' (e.g. via '--list' flag
> or the '--get*' flags) then it is sometimes hard to find the
> configuration file where the values were defined.
> 
> Teach 'git config' the '--sources' option to print the source
> configuration file for every printed value.
> 
> Based-on-patch-by: Jeff King <peff@peff.net>
> Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
> ---
> 
> diff to v1:
> 
> * add documention
> * produce a consistent (tab-delimited) format that can be parsed
> * adhere declaration-after-statement style
> * prefix every source line with the source type (file, stdin, blob, cmd)
> * add relative path test case
> * add blob ref test case
> * add "git config --local" test case (Note: I think I found a bug there that I
>   plan to fix/investigate in a seperate patch. Is it ok to leave the TODO?)
> * add a test case to check funny character escapes (file name with tabs)
> 
> Sebastian suggested "--show-origin" as a better option name over "--sources".
> I still believe "--sources" might be slightly better as I fear that users could
> somehow related "origin" to "remote" kind of configs. However, I am happy to
> change that if a majority prefers "--show-origin".

<bikeshed>
As I have said before, I'm not very good at naming things, but ...

Of the two, I *slightly* prefer --show-origin, since I don't think
there will be any confusion. However, I think --source may be OK too
(for some reason it sounds better than the plural). Another idea
may be --show-source. ;-)

</bikeshed>

ATB,
Ramsay Jones

  reply	other threads:[~2016-02-10 12:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-10 10:13 [PATCH v2] config: add '--sources' option to print the source of a config value larsxschneider
2016-02-10 12:47 ` Ramsay Jones [this message]
2016-02-10 15:28   ` Sebastian Schuberth
2016-02-10 16:03     ` Ramsay Jones
2016-02-10 12:54 ` Jeff King
2016-02-10 15:33   ` Sebastian Schuberth
2016-02-10 15:40     ` Jeff King
2016-02-10 15:57       ` Sebastian Schuberth
2016-02-10 16:24         ` Jeff King
2016-02-10 19:03 ` Eric Sunshine

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=56BB3157.7080307@ramsayjones.plus.com \
    --to=ramsay@ramsayjones.plus.com \
    --cc=git@vger.kernel.org \
    --cc=larsxschneider@gmail.com \
    --cc=peff@peff.net \
    --cc=sschuberth@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 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.