* git-diff(1) appears to contradict itself
@ 2013-02-12 2:49 Reuben Thomas
2013-02-12 2:54 ` Junio C Hamano
0 siblings, 1 reply; 3+ messages in thread
From: Reuben Thomas @ 2013-02-12 2:49 UTC (permalink / raw)
To: git
Under the --color=<when> option, it says:
Show colored diff. The value must be always (the default for <when>),
never, or auto. The default value is never.
That seems to imply that the default is both always and never. If I'm
right, I suggest removing the parenthesis, and putting the correct
default value at the end of the sentence. If I'm wrong, I suggest
clarification!
--
http://rrt.sc3d.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git-diff(1) appears to contradict itself
2013-02-12 2:49 git-diff(1) appears to contradict itself Reuben Thomas
@ 2013-02-12 2:54 ` Junio C Hamano
2013-02-12 3:09 ` Reuben Thomas
0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2013-02-12 2:54 UTC (permalink / raw)
To: Reuben Thomas; +Cc: git
Reuben Thomas <rrt@sc3d.org> writes:
> Under the --color=<when> option, it says:
>
> Show colored diff. The value must be always (the default for <when>),
> never, or auto. The default value is never.
I think it wants to say this:
You can say "diff --color" without saying "when". That is the
same as saying "diff --color=always".
If you do not say "--color" at all, that is exactly the same as
saying "diff --color=never".
Patches welcome.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git-diff(1) appears to contradict itself
2013-02-12 2:54 ` Junio C Hamano
@ 2013-02-12 3:09 ` Reuben Thomas
0 siblings, 0 replies; 3+ messages in thread
From: Reuben Thomas @ 2013-02-12 3:09 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
On 12 February 2013 02:54, Junio C Hamano <gitster@pobox.com> wrote:
> Reuben Thomas <rrt@sc3d.org> writes:
>
>> Under the --color=<when> option, it says:
>>
>> Show colored diff. The value must be always (the default for <when>),
>> never, or auto. The default value is never.
>
> I think it wants to say this:
>
> You can say "diff --color" without saying "when". That is the
> same as saying "diff --color=always".
>
> If you do not say "--color" at all, that is exactly the same as
> saying "diff --color=never".
>
> Patches welcome.
Thanks for the explanation. Something like this, then:
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 7a87473..9a02992 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -174,9 +174,9 @@ any of those replacements occurred.
`diff.submodule` configuration variable.
--color[=<when>]::
- Show colored diff.
- The value must be `always` (the default for `<when>`), `never`, or `auto`.
- The default value is `never`.
+ Show colored diff (off by default).
+ The value must be `always`, `never`, or `auto`.
+ `--color` is the same as `--color=always`.
ifdef::git-diff[]
It can be changed by the `color.ui` and `color.diff`
configuration settings.
? I guess other commands that work the same, such as git-grep, could
do with a similar patch (indeed, I based my wording on that in the
git-grep page, but that has different problems.) Or you could use the
same fragment twice if that is possible in your system?
--
http://rrt.sc3d.org
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-02-12 3:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-12 2:49 git-diff(1) appears to contradict itself Reuben Thomas
2013-02-12 2:54 ` Junio C Hamano
2013-02-12 3:09 ` Reuben Thomas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox