git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael J Gruber <git@drmicha.warpmail.net>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>, Elias Persson <delreich@takeit.se>
Subject: [PATCH] config.txt,diff-options.txt: porcelain vs. plumbing for color.diff
Date: Wed, 27 Apr 2011 09:38:27 +0200	[thread overview]
Message-ID: <24a6907cade7aedb51dc20ab5977603ca21e70bb.1303889849.git.git@drmicha.warpmail.net> (raw)
In-Reply-To: <7voc3sewpg.fsf@alter.siamese.dyndns.org>

Reading the diff-family and config man pages one may think that the
color.diff and color.ui settings apply to all diff commands. Make it
clearer that they do not apply to the plumbing variants
diff-{files,index,tree}.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
 Documentation/config.txt       |    4 ++--
 Documentation/diff-options.txt |   15 +++++++++++----
 2 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/Documentation/config.txt b/Documentation/config.txt
index 750c86d..1e22832 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -708,7 +708,7 @@ second is the background.  The position of the attribute, if any,
 doesn't matter.
 
 color.diff::
-	When set to `always`, always use colors in patch.
+	When set to `always`, always use colors in patch for porcelain commands.
 	When false (or `never`), never.  When set to `true` or `auto`, use
 	colors only when the output is to the terminal. Defaults to false.
 
@@ -796,7 +796,7 @@ color.status.<slot>::
 	color.branch.<slot>.
 
 color.ui::
-	When set to `always`, always use colors in all git commands which
+	When set to `always`, always use colors in all porcelain commands which
 	are capable of colored output. When false (or `never`), never. When
 	set to `true` or `auto`, use colors only when the output is to the
 	terminal. When more specific variables of color.* are set, they always
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index c93124b..c26e494 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -120,12 +120,19 @@ any of those replacements occurred.
 
 --color[=<when>]::
 	Show colored diff.
-	The value must be always (the default), never, or auto.
+	The value must be `always` (the default for `<when>`), `never`, or `auto`.
+	The default value is `never`.
+ifdef::git-diff[]
+	It can be changed by the `color.ui` and `color.diff`
+	configuration settings.
+endif::git-diff[]
 
 --no-color::
-	Turn off colored diff, even when the configuration file
-	gives the default to color output.
-	Same as `--color=never`.
+	Turn off colored diff.
+ifdef::git-diff[]
+	This can be used to override configuration settings.
+endif::git-diff[]
+	It is the same as `--color=never`.
 
 --word-diff[=<mode>]::
 	Show a word diff, using the <mode> to delimit changed words.
-- 
1.7.5.270.gafca7

  parent reply	other threads:[~2011-04-27  7:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-26 15:04 git diff-index ignores color config Elias Persson
2011-04-26 17:42 ` Junio C Hamano
2011-04-27  7:20   ` Elias Persson
2011-04-27  7:38   ` Michael J Gruber [this message]
2011-04-27  9:03     ` [PATCH] config.txt,diff-options.txt: porcelain vs. plumbing for color.diff Jonathan Nieder
2011-04-27 16:39       ` Junio C Hamano
2011-04-27 18:30         ` Junio C Hamano
2011-04-27 22:12           ` Jonathan Nieder
2011-04-28  7:47             ` Michael J Gruber

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=24a6907cade7aedb51dc20ab5977603ca21e70bb.1303889849.git.git@drmicha.warpmail.net \
    --to=git@drmicha.warpmail.net \
    --cc=delreich@takeit.se \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).