git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [add-default-config 1/5] add --color option to git config
@ 2017-11-12 15:00 Soukaina NAIT HMID
  2017-11-12 15:00 ` [add-default-config 5/5] fix return code on default + add tests Soukaina NAIT HMID
                   ` (5 more replies)
  0 siblings, 6 replies; 14+ messages in thread
From: Soukaina NAIT HMID @ 2017-11-12 15:00 UTC (permalink / raw)
  To: git

From: Soukaina NAIT HMID <snaithmid@bloomberg.net>

Signed-off-by: Soukaina NAIT HMID <snaithmid@bloomberg.net>
---
 Documentation/git-config.txt | 4 ++++
 builtin/config.c             | 1 +
 2 files changed, 5 insertions(+)

diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
index 4edd09fc6b074..5d5cd58fdae37 100644
--- a/Documentation/git-config.txt
+++ b/Documentation/git-config.txt
@@ -179,6 +179,10 @@ See also <<FILES>>.
 	specified user.  This option has no effect when setting the
 	value (but you can use `git config section.variable ~/`
 	from the command line to let your shell do the expansion).
+--color::
+	Find the color configured for `name` (e.g. `color.diff.new`) and
+	output it as the ANSI color escape sequence to the standard
+	output. 
 
 -z::
 --null::
diff --git a/builtin/config.c b/builtin/config.c
index d13daeeb55927..124a682d50fa8 100644
--- a/builtin/config.c
+++ b/builtin/config.c
@@ -80,6 +80,7 @@ static struct option builtin_config_options[] = {
 	OPT_BIT(0, "int", &types, N_("value is decimal number"), TYPE_INT),
 	OPT_BIT(0, "bool-or-int", &types, N_("value is --bool or --int"), TYPE_BOOL_OR_INT),
 	OPT_BIT(0, "path", &types, N_("value is a path (file or directory name)"), TYPE_PATH),
+	OPT_BIT(0, "color", &actions, N_("find the color configured"), ACTION_GET_COLOR),
 	OPT_GROUP(N_("Other")),
 	OPT_BOOL('z', "null", &end_null, N_("terminate values with NUL byte")),
 	OPT_BOOL(0, "name-only", &omit_values, N_("show variable names only")),

--
https://github.com/git/git/pull/431

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-12-02 20:33 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-12 15:00 [add-default-config 1/5] add --color option to git config Soukaina NAIT HMID
2017-11-12 15:00 ` [add-default-config 5/5] fix return code on default + add tests Soukaina NAIT HMID
2017-11-12 16:04   ` Jeff King
2017-11-12 15:00 ` [add-default-config 4/5] add defaults for path/int/bool Soukaina NAIT HMID
2017-11-12 15:45   ` Jeff King
2017-11-12 15:00 ` [add-default-config 3/5] add same test for new command format with --default and --color Soukaina NAIT HMID
2017-11-12 15:37   ` Jeff King
2017-11-12 15:00 ` [add-default-config 2/5] adding default to color Soukaina NAIT HMID
2017-11-12 15:37   ` Jeff King
2017-11-13  3:40     ` Junio C Hamano
2017-11-13  3:55       ` Jeff King
2017-11-12 15:22 ` [add-default-config 1/5] add --color option to git config Jeff King
2017-11-28 21:43 ` [add-default-config] add --default " Soukaina NAIT HMID
2017-12-02 20:33   ` Philip Oakley

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).