{"thread":{"id":"38360","subject":"[PATCH] diff: added '-q' option, short option for '--quiet'","startedAt":"2015-01-14T17:35:01Z","lastAt":"2015-01-14T18:52:52Z","messageCount":2,"participants":["Alexander Kuleshov","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"254665","messageId":"1421256901-30560-1-git-send-email-kuleshovmail@gmail.com","threadId":"38360","inReplyTo":null,"subject":"[PATCH] diff: added '-q' option, short option for '--quiet'","fromName":"Alexander Kuleshov","fromEmail":"kuleshovmail@gmail.com","sentAt":"2015-01-14T17:35:01Z","receivedAt":"2015-01-14T17:35:01Z","isPatch":true,"sender":{"key":"kuleshovmail@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2699235?v=4"},"body":"Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>\n---\n Documentation/diff-options.txt | 1 +\n diff.c                         | 2 +-\n 2 files changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt\nindex 2b15050..9160c90 100644\n--- a/Documentation/diff-options.txt\n+++ b/Documentation/diff-options.txt\n@@ -491,6 +491,7 @@ ifndef::git-log[]\n \tThat is, it exits with 1 if there were differences and\n \t0 means no differences.\n \n+-q\n --quiet::\n \tDisable all output of the program. Implies `--exit-code`.\n endif::git-log[]\ndiff --git a/diff.c b/diff.c\nindex 6ad8970..d778df7 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -3798,7 +3798,7 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)\n \t}\n \telse if (!strcmp(arg, \"--exit-code\"))\n \t\tDIFF_OPT_SET(options, EXIT_WITH_STATUS);\n-\telse if (!strcmp(arg, \"--quiet\"))\n+\telse if (!strcmp(arg, \"--quiet\") || !strcmp(arg, \"-q\"))\n \t\tDIFF_OPT_SET(options, QUICK);\n \telse if (!strcmp(arg, \"--ext-diff\"))\n \t\tDIFF_OPT_SET(options, ALLOW_EXTERNAL);\n-- \n2.3.0.rc0.256.gb0e92c0\n"},{"id":"254677","messageId":"xmqqegqx9ou3.fsf@gitster.dls.corp.google.com","threadId":"38360","inReplyTo":"1421256901-30560-1-git-send-email-kuleshovmail@gmail.com","subject":"Re: [PATCH] diff: added '-q' option, short option for '--quiet'","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-01-14T18:52:52Z","receivedAt":"2015-01-14T18:52:52Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Alexander Kuleshov <kuleshovmail@gmail.com> writes:\n\n> Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>\n> ---\n>  Documentation/diff-options.txt | 1 +\n>  diff.c                         | 2 +-\n>  2 files changed, 2 insertions(+), 1 deletion(-)\n\nI think we have deliberately refrained from doing this, as it will\nmake \"git diff\" inconsistent with the underlying \"git diff-fiels\".\n\n>\n> diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt\n> index 2b15050..9160c90 100644\n> --- a/Documentation/diff-options.txt\n> +++ b/Documentation/diff-options.txt\n> @@ -491,6 +491,7 @@ ifndef::git-log[]\n>  \tThat is, it exits with 1 if there were differences and\n>  \t0 means no differences.\n>  \n> +-q\n>  --quiet::\n>  \tDisable all output of the program. Implies `--exit-code`.\n>  endif::git-log[]\n> diff --git a/diff.c b/diff.c\n> index 6ad8970..d778df7 100644\n> --- a/diff.c\n> +++ b/diff.c\n> @@ -3798,7 +3798,7 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)\n>  \t}\n>  \telse if (!strcmp(arg, \"--exit-code\"))\n>  \t\tDIFF_OPT_SET(options, EXIT_WITH_STATUS);\n> -\telse if (!strcmp(arg, \"--quiet\"))\n> +\telse if (!strcmp(arg, \"--quiet\") || !strcmp(arg, \"-q\"))\n>  \t\tDIFF_OPT_SET(options, QUICK);\n>  \telse if (!strcmp(arg, \"--ext-diff\"))\n>  \t\tDIFF_OPT_SET(options, ALLOW_EXTERNAL);\n"}]}