* [PATCH] diff: added '-q' option, short option for '--quiet'
@ 2015-01-14 17:35 Alexander Kuleshov
2015-01-14 18:52 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Kuleshov @ 2015-01-14 17:35 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Alexander Kuleshov
Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
---
Documentation/diff-options.txt | 1 +
diff.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 2b15050..9160c90 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -491,6 +491,7 @@ ifndef::git-log[]
That is, it exits with 1 if there were differences and
0 means no differences.
+-q
--quiet::
Disable all output of the program. Implies `--exit-code`.
endif::git-log[]
diff --git a/diff.c b/diff.c
index 6ad8970..d778df7 100644
--- a/diff.c
+++ b/diff.c
@@ -3798,7 +3798,7 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
}
else if (!strcmp(arg, "--exit-code"))
DIFF_OPT_SET(options, EXIT_WITH_STATUS);
- else if (!strcmp(arg, "--quiet"))
+ else if (!strcmp(arg, "--quiet") || !strcmp(arg, "-q"))
DIFF_OPT_SET(options, QUICK);
else if (!strcmp(arg, "--ext-diff"))
DIFF_OPT_SET(options, ALLOW_EXTERNAL);
--
2.3.0.rc0.256.gb0e92c0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] diff: added '-q' option, short option for '--quiet'
2015-01-14 17:35 [PATCH] diff: added '-q' option, short option for '--quiet' Alexander Kuleshov
@ 2015-01-14 18:52 ` Junio C Hamano
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2015-01-14 18:52 UTC (permalink / raw)
To: Alexander Kuleshov; +Cc: git
Alexander Kuleshov <kuleshovmail@gmail.com> writes:
> Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
> ---
> Documentation/diff-options.txt | 1 +
> diff.c | 2 +-
> 2 files changed, 2 insertions(+), 1 deletion(-)
I think we have deliberately refrained from doing this, as it will
make "git diff" inconsistent with the underlying "git diff-fiels".
>
> diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
> index 2b15050..9160c90 100644
> --- a/Documentation/diff-options.txt
> +++ b/Documentation/diff-options.txt
> @@ -491,6 +491,7 @@ ifndef::git-log[]
> That is, it exits with 1 if there were differences and
> 0 means no differences.
>
> +-q
> --quiet::
> Disable all output of the program. Implies `--exit-code`.
> endif::git-log[]
> diff --git a/diff.c b/diff.c
> index 6ad8970..d778df7 100644
> --- a/diff.c
> +++ b/diff.c
> @@ -3798,7 +3798,7 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
> }
> else if (!strcmp(arg, "--exit-code"))
> DIFF_OPT_SET(options, EXIT_WITH_STATUS);
> - else if (!strcmp(arg, "--quiet"))
> + else if (!strcmp(arg, "--quiet") || !strcmp(arg, "-q"))
> DIFF_OPT_SET(options, QUICK);
> else if (!strcmp(arg, "--ext-diff"))
> DIFF_OPT_SET(options, ALLOW_EXTERNAL);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-14 18:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-14 17:35 [PATCH] diff: added '-q' option, short option for '--quiet' Alexander Kuleshov
2015-01-14 18:52 ` Junio C Hamano
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).