{"thread":{"id":"34439","subject":"Bug in \"git show\"?","startedAt":"2013-07-15T11:25:59Z","lastAt":"2013-07-18T00:51:19Z","messageCount":43,"participants":["Stefan Beller","Matthieu Moy","Junio C Hamano","Jonathan Nieder"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"223417","messageId":"51E3DC47.70107@googlemail.com","threadId":"34439","inReplyTo":null,"subject":"Bug in \"git show\"?","fromName":"Stefan Beller","fromEmail":"stefanbeller@googlemail.com","sentAt":"2013-07-15T11:25:59Z","receivedAt":"2013-07-15T11:25:59Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA1\n\nHello,\n\nso I wanted to write a script using some git commands,\nbut the output of the git commands is not as expected.\nI am using\n\ngit --version\ngit version 1.8.3.2.804.g0da7a53\n(current origin/master at git://github.com/gitster/git.git)\n\nThe command I am trying to use is\ngit --no-pager show --format=\"%ad\" <commit>\n\nExpected output:\nsb@sb:~/OSS/git$ git show --format=\"%ad\" 0da7a53^\nFri Jul 12 12:04:19 2013 -0700\n\nsb@sb:~/OSS/git$ git show --format=\"%ad\" 0da7a53^^\nFri Jul 12 12:04:17 2013 -0700\n\nsb@sb:~/OSS/git$ git show --format=\"%ad\" 0da7a53^^^\nFri Jul 12 12:04:16 2013 -0700\n\nsb@sb:~/OSS/git$ git show --format=\"%ad\" 0da7a53^^^^\nFri Jul 12 12:04:14 2013 -0700\n\nsb@sb:~/OSS/git$ git show --format=\"%ad\" 0da7a53^^^^^\nFri Jul 12 12:04:12 2013 -0700\n\nsb@sb:~/OSS/git$ git show --format=\"%ad\" 0da7a53^^^^^^\nFri Jul 12 12:04:10 2013 -0700\n\nsb@sb:~/OSS/git$ git show --format=\"%ad\" 0da7a53^^^^^^^\nFri Jul 12 12:04:09 2013 -0700\n\nsb@sb:~/OSS/git$ git show --format=\"%ad\" 0da7a53^^^^^^^^\nFri Jul 12 12:04:07 2013 -0700\n\nHowever I sometimes also get:\nsb@sb:~/OSS/git$ git show --format=\"%ad\" 0da7a53\nFri Jul 12 10:49:34 2013 -0700\n\ndiff --git a/Documentation/RelNotes/1.8.4.txt\nb/Documentation/RelNotes/1.8.4.txt\nindex 0e50df8..4250e5a 100644\n- --- a/Documentation/RelNotes/1.8.4.txt\n+++ b/Documentation/RelNotes/1.8.4.txt\n@@ -79,6 +79,13 @@ Foreign interfaces, subsystems and ports.\n\n UI, Workflows & Features\n\n+ * \"gitweb\" learned to optionally place extra links that point at the\n+   levels higher than the Gitweb pages themselves in the breadcrumbs,\n+   so that it can be used as part of a larger installation.\n+\n+ * \"git log --format=\" now honors i18n.logoutputencoding configuration\n+   variable.\n+\n  * The \"push.default=simple\" mode of \"git push\" has been updated to\n    behave like \"current\" without requiring a remote tracking\n    information, when you push to a remote that is different from where\n\n\nsb@sb:~/OSS/git$ git show --format=\"%ad\" 0da7a53^^^^^^^^\nFri Jul 12 12:04:07 2013 -0700\n\ndiff --cc t/t5505-remote.sh\nindex ee5d65d,8d0f3e3..8f6e392\n- --- a/t/t5505-remote.sh\n+++ b/t/t5505-remote.sh\n@@@ -61,25 -62,25 +61,25 @@@ test_expect_success C_LOCALE_OUTPUT 're\n  '\n\n  test_expect_success 'add another remote' '\n -(\n -      cd test &&\n -      git remote add -f second ../two &&\n -      tokens_match \"origin second\" \"$(git remote)\" &&\n -      check_tracking_branch second master side another &&\n -      git for-each-ref \"--format=%(refname)\" refs/remotes |\n -      sed -e \"/^refs\\/remotes\\/origin\\//d\" \\\n -          -e \"/^refs\\/remotes\\/second\\//d\" >actual &&\n -      >expect &&\n\n\n\n\nSo at some commits, also the diff is shown, which should not happen\nif you're using --format=\"%ad\" to my understanding.\n\nSo far it seems to be deterministic here. (Each commit either always\nbehaves correctly or incorrectly). Initially I suspected it being\ndifferent for merges or no-merges, but I gut the unexpected behavior\nfor both merge and non-merge commits.\n\nCan somebody confirm this behavior or has any idea, whether I am doing\nsomething wrong here?\n\nThanks,\nStefan\n-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.12 (GNU/Linux)\nComment: Using GnuPG with undefined - http://www.enigmail.net/\n\niQIcBAEBAgAGBQJR49xHAAoJEJQCPTzLflhqiFcP/0S5M71urjn1Fh5Cz2950wBl\ncs6+r9wKF5366wv3Ombfh0KrOPQCE7Yv1GWk2r2L008BWrz0wgnsl1xnMnAT00dH\n1WzmupWExxwXHAueDisq2qL4dubFrnVxKWvpwxBd3JBbsWNXeTGl5o6dl69zaXdx\nJHzIHvw1/vrxoCLaflitjcQezuFITOVVoNsYawK12gznjxujONm0sej5TBFUw784\nK5KTJNJqxzUf9+Z+88hg2oif7kJlugTIqtH5sRMVwXrkpc12f+HcwROg0srE5ITc\n8WpK0s7xgZokUCohMhUXlLAOYJwAZju+K1LExkrQ9T32oP4iAKsJpqcRLAAX6Ig7\nOeaWUQ2WX2CfYDExjuV6h+FXAU0qT87iv3PgeZWAnmgDQPUwFboIxuF1Nrpq/FOY\nIoe2YOsFOdhmuDjCHEfu0aVNOeejHS8LEkC1IUI/+PzDlEJC/b17SwEdrD4aVCPj\nRZhz2zI8ZxYHP9ITvMDs1VQRP6jMSAwEtAWg7ac7ypETToOIAxRp2j9Rrjayt8A5\n/TZ++wMh7G4Tm/D9+iutQnqzE8E8eiT6i7LgAcDSA3g6oq7/hUzupKU2lc+znO2J\nwxiwdqYBHWtw1Jc8eaZAJC/NMfxbRzOSCx4lJbO+tpXP0pR/OPIg2f2wUXcAh3zH\nJC9GdEUVIwN34j2ueoZ8\n=G6Oc\n-----END PGP SIGNATURE-----\n"},{"id":"223418","messageId":"vpqa9lof2e4.fsf@anie.imag.fr","threadId":"34439","inReplyTo":"51E3DC47.70107@googlemail.com","subject":"Re: Bug in \"git show\"?","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2013-07-15T12:12:19Z","receivedAt":"2013-07-15T12:12:19Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Stefan Beller <stefanbeller@googlemail.com> writes:\n\n> However I sometimes also get:\n> sb@sb:~/OSS/git$ git show --format=\"%ad\" 0da7a53\n> Fri Jul 12 10:49:34 2013 -0700\n>\n> diff --git a/Documentation/RelNotes/1.8.4.txt\n> b/Documentation/RelNotes/1.8.4.txt\n> index 0e50df8..4250e5a 100644\n> --- a/Documentation/RelNotes/1.8.4.txt\n> +++ b/Documentation/RelNotes/1.8.4.txt\n\n\"git show\" will show the diff by default. For merge commits, it shows\nthe --cc diff which is often empty, hence the behavior you see.\n\nYou want to use \"git show -s\", which suppresses the patch output.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"223419","messageId":"51E3E9D6.4070201@googlemail.com","threadId":"34439","inReplyTo":"vpqa9lof2e4.fsf@anie.imag.fr","subject":"Re: Bug in \"git show\"?","fromName":"Stefan Beller","fromEmail":"stefanbeller@googlemail.com","sentAt":"2013-07-15T12:23:50Z","receivedAt":"2013-07-15T12:23:50Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On 07/15/2013 02:12 PM, Matthieu Moy wrote:\n> Stefan Beller <stefanbeller@googlemail.com> writes:\n> \n>> However I sometimes also get:\n>> sb@sb:~/OSS/git$ git show --format=\"%ad\" 0da7a53\n>> Fri Jul 12 10:49:34 2013 -0700\n>>\n>> diff --git a/Documentation/RelNotes/1.8.4.txt\n>> b/Documentation/RelNotes/1.8.4.txt\n>> index 0e50df8..4250e5a 100644\n>> --- a/Documentation/RelNotes/1.8.4.txt\n>> +++ b/Documentation/RelNotes/1.8.4.txt\n> \n> \"git show\" will show the diff by default. For merge commits, it shows\n> the --cc diff which is often empty, hence the behavior you see.\n> \n> You want to use \"git show -s\", which suppresses the patch output.\n> \n\nThanks, that's exactly what I am looking for.\nStefan\n\n"},{"id":"223427","messageId":"1373893639-13413-1-git-send-email-Matthieu.Moy@imag.fr","threadId":"34439","inReplyTo":"vpqa9lof2e4.fsf@anie.imag.fr","subject":"[PATCH 0/5] Make \"git show -s\" easier to discover for users","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2013-07-15T13:07:14Z","receivedAt":"2013-07-15T13:07:14Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"> Stefan Beller <stefanbeller@googlemail.com> writes:\n>\n>> However I sometimes also get:\n>> sb@sb:~/OSS/git$ git show --format=\"%ad\" 0da7a53\n>> Fri Jul 12 10:49:34 2013 -0700\n>>\n>> diff --git a/Documentation/RelNotes/1.8.4.txt\n>> b/Documentation/RelNotes/1.8.4.txt\n>> index 0e50df8..4250e5a 100644\n>> --- a/Documentation/RelNotes/1.8.4.txt\n>> +++ b/Documentation/RelNotes/1.8.4.txt\n>\n> \"git show\" will show the diff by default. For merge commits, it shows\n> the --cc diff which is often empty, hence the behavior you see.\n>\n> You want to use \"git show -s\", which suppresses the patch output.\n\n... and this \"git show -s\" is extraordinarily hard to discover, as it\nis only documented in \"git log --help\". Google has been my friend\nhere, but we should really improve that.\n\nThis patch series does essentially two things:\n\n* Add a --no-patch synonym for -s. I'm actually wondering why the\n  option wasn't called this way from the beginning.\n\n* Reorganize the doc so that \"git show\" actually mentions it.\n\nWhile we're there, there's a reformatting patch, and one to make \"git\nlog --no-patch --patch\" actually show the patch.\n\n(60aa9cf8f3, Documentation: document show -s, Tue Nov 9 11:12:48 2010\nactually acknowledged that the documentation wasn't complete and that\nsomething else was needed, this should be it)\n\nMatthieu Moy (5):\n  diff: allow --no-patch as synonym for -s\n  diff: allow --patch to override -s/--no-patch\n  Documentation/git-show.txt: include common diff options, like\n    git-log.txt\n  Documentation: move description of -s, --no-patch to diff-options.txt\n  Documentation/git-log.txt: capitalize section names\n\n Documentation/diff-options.txt     | 5 +++++\n Documentation/git-log.txt          | 8 ++++----\n Documentation/git-show.txt         | 9 +++++++++\n Documentation/rev-list-options.txt | 3 ---\n diff.c                             | 7 ++++---\n 5 files changed, 22 insertions(+), 10 deletions(-)\n\n-- \n1.8.3.1.495.g13f33cf.dirty\n"},{"id":"223423","messageId":"1373893639-13413-2-git-send-email-Matthieu.Moy@imag.fr","threadId":"34439","inReplyTo":"1373893639-13413-1-git-send-email-Matthieu.Moy@imag.fr","subject":"[PATCH 1/5] diff: allow --no-patch as synonym for -s","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2013-07-15T13:07:15Z","receivedAt":"2013-07-15T13:07:15Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"This follows the usual convention of having a --no-foo option to negate\n--foo.\n\nSigned-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n---\n Documentation/rev-list-options.txt | 1 +\n diff.c                             | 2 +-\n 2 files changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt\nindex e157ec3..c128a85 100644\n--- a/Documentation/rev-list-options.txt\n+++ b/Documentation/rev-list-options.txt\n@@ -851,5 +851,6 @@ options may be given. See linkgit:git-diff-files[1] for more options.\n \tShow the tree objects in the diff output. This implies '-r'.\n \n -s::\n+--no-patch::\n \tSuppress diff output.\n endif::git-rev-list[]\ndiff --git a/diff.c b/diff.c\nindex 6578690..6bd821d 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -3551,7 +3551,7 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)\n \t\toptions->output_format |= DIFF_FORMAT_NAME;\n \telse if (!strcmp(arg, \"--name-status\"))\n \t\toptions->output_format |= DIFF_FORMAT_NAME_STATUS;\n-\telse if (!strcmp(arg, \"-s\"))\n+\telse if (!strcmp(arg, \"-s\") || !strcmp(arg, \"--no-patch\"))\n \t\toptions->output_format |= DIFF_FORMAT_NO_OUTPUT;\n \telse if (!prefixcmp(arg, \"--stat\"))\n \t\t/* --stat, --stat-width, --stat-name-width, or --stat-count */\n-- \n1.8.3.1.495.g13f33cf.dirty\n"},{"id":"223424","messageId":"1373893639-13413-3-git-send-email-Matthieu.Moy@imag.fr","threadId":"34439","inReplyTo":"1373893639-13413-1-git-send-email-Matthieu.Moy@imag.fr","subject":"[PATCH 2/5] diff: allow --patch to override -s/--no-patch","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2013-07-15T13:07:16Z","receivedAt":"2013-07-15T13:07:16Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n---\n diff.c | 5 +++--\n 1 file changed, 3 insertions(+), 2 deletions(-)\n\ndiff --git a/diff.c b/diff.c\nindex 6bd821d..66a6877 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -3515,9 +3515,10 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)\n \tint argcount;\n \n \t/* Output format options */\n-\tif (!strcmp(arg, \"-p\") || !strcmp(arg, \"-u\") || !strcmp(arg, \"--patch\"))\n+\tif (!strcmp(arg, \"-p\") || !strcmp(arg, \"-u\") || !strcmp(arg, \"--patch\")) {\n+\t\toptions->output_format &= ~DIFF_FORMAT_NO_OUTPUT;\n \t\toptions->output_format |= DIFF_FORMAT_PATCH;\n-\telse if (opt_arg(arg, 'U', \"unified\", &options->context))\n+\t} else if (opt_arg(arg, 'U', \"unified\", &options->context))\n \t\toptions->output_format |= DIFF_FORMAT_PATCH;\n \telse if (!strcmp(arg, \"--raw\"))\n \t\toptions->output_format |= DIFF_FORMAT_RAW;\n-- \n1.8.3.1.495.g13f33cf.dirty\n"},{"id":"223422","messageId":"1373893639-13413-4-git-send-email-Matthieu.Moy@imag.fr","threadId":"34439","inReplyTo":"1373893639-13413-1-git-send-email-Matthieu.Moy@imag.fr","subject":"[PATCH 3/5] Documentation/git-show.txt: include common diff options, like git-log.txt","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2013-07-15T13:07:17Z","receivedAt":"2013-07-15T13:07:17Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n---\n Documentation/git-show.txt | 9 +++++++++\n 1 file changed, 9 insertions(+)\n\ndiff --git a/Documentation/git-show.txt b/Documentation/git-show.txt\nindex ae4edcc..4e617e6 100644\n--- a/Documentation/git-show.txt\n+++ b/Documentation/git-show.txt\n@@ -45,6 +45,15 @@ include::pretty-options.txt[]\n include::pretty-formats.txt[]\n \n \n+COMMON DIFF OPTIONS\n+-------------------\n+\n+:git-log: 1\n+include::diff-options.txt[]\n+\n+include::diff-generate-patch.txt[]\n+\n+\n EXAMPLES\n --------\n \n-- \n1.8.3.1.495.g13f33cf.dirty\n"},{"id":"223426","messageId":"1373893639-13413-5-git-send-email-Matthieu.Moy@imag.fr","threadId":"34439","inReplyTo":"1373893639-13413-1-git-send-email-Matthieu.Moy@imag.fr","subject":"[PATCH 4/5] Documentation: move description of -s, --no-patch to diff-options.txt","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2013-07-15T13:07:18Z","receivedAt":"2013-07-15T13:07:18Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"Technically, \"-s, --no-patch\" is implemented in diff.c (\"git diff\n--no-patch\" is essentially useless, but valid). From the user point of\nview, this allows the documentation to show up in \"git show --help\",\nwhich is one of the most useful use of the option.\n\nWhile we're there, add a sentence explaining why the option can be\nuseful.\n\nSigned-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n---\nIt might make sense to surround this with ifndef::git-diff[], but\nsince \"git diff --no-patch\" actually works, I've left it\nunconditional to be technically correct.\n\n Documentation/diff-options.txt     | 5 +++++\n Documentation/rev-list-options.txt | 4 ----\n 2 files changed, 5 insertions(+), 4 deletions(-)\n\ndiff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt\nindex 87e92d6..bbed2cd 100644\n--- a/Documentation/diff-options.txt\n+++ b/Documentation/diff-options.txt\n@@ -26,6 +26,11 @@ ifndef::git-format-patch[]\n \t{git-diff? This is the default.}\n endif::git-format-patch[]\n \n+-s::\n+--no-patch::\n+\tSuppress diff output. Useful for commands like `git show` that\n+\tshow the patch by default, or to cancel the effect of `--patch`.\n+\n -U<n>::\n --unified=<n>::\n \tGenerate diffs with <n> lines of context instead of\ndiff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt\nindex c128a85..e632e85 100644\n--- a/Documentation/rev-list-options.txt\n+++ b/Documentation/rev-list-options.txt\n@@ -849,8 +849,4 @@ options may be given. See linkgit:git-diff-files[1] for more options.\n -t::\n \n \tShow the tree objects in the diff output. This implies '-r'.\n-\n--s::\n---no-patch::\n-\tSuppress diff output.\n endif::git-rev-list[]\n-- \n1.8.3.1.495.g13f33cf.dirty\n"},{"id":"223425","messageId":"1373893639-13413-6-git-send-email-Matthieu.Moy@imag.fr","threadId":"34439","inReplyTo":"1373893639-13413-1-git-send-email-Matthieu.Moy@imag.fr","subject":"[PATCH 5/5] Documentation/git-log.txt: capitalize section names","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2013-07-15T13:07:19Z","receivedAt":"2013-07-15T13:07:19Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"This is the convention in other files and even at the beginning of git-log.txt\n\nSigned-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n---\n Documentation/git-log.txt | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/Documentation/git-log.txt b/Documentation/git-log.txt\nindex 2ea79ba..2eda5e4 100644\n--- a/Documentation/git-log.txt\n+++ b/Documentation/git-log.txt\n@@ -97,7 +97,7 @@ include::rev-list-options.txt[]\n \n include::pretty-formats.txt[]\n \n-Common diff options\n+COMMON DIFF OPTIONS\n -------------------\n \n :git-log: 1\n@@ -105,7 +105,7 @@ include::diff-options.txt[]\n \n include::diff-generate-patch.txt[]\n \n-Examples\n+EXAMPLES\n --------\n `git log --no-merges`::\n \n@@ -161,12 +161,12 @@ git log -L '/int main/',/^}/:main.c::\n `git log -3`::\n \tLimits the number of commits to show to 3.\n \n-Discussion\n+DISCUSSION\n ----------\n \n include::i18n.txt[]\n \n-Configuration\n+CONFIGURATION\n -------------\n \n See linkgit:git-config[1] for core variables and linkgit:git-diff[1]\n-- \n1.8.3.1.495.g13f33cf.dirty\n"},{"id":"223433","messageId":"7va9lneuw5.fsf@alter.siamese.dyndns.org","threadId":"34439","inReplyTo":"1373893639-13413-4-git-send-email-Matthieu.Moy@imag.fr","subject":"Re: [PATCH 3/5] Documentation/git-show.txt: include common diff options, like git-log.txt","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-07-15T14:54:18Z","receivedAt":"2013-07-15T14:54:18Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matthieu Moy <Matthieu.Moy@imag.fr> writes:\n\n> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n> ---\n>  Documentation/git-show.txt | 9 +++++++++\n>  1 file changed, 9 insertions(+)\n>\n> diff --git a/Documentation/git-show.txt b/Documentation/git-show.txt\n> index ae4edcc..4e617e6 100644\n> --- a/Documentation/git-show.txt\n> +++ b/Documentation/git-show.txt\n> @@ -45,6 +45,15 @@ include::pretty-options.txt[]\n>  include::pretty-formats.txt[]\n>  \n>  \n> +COMMON DIFF OPTIONS\n> +-------------------\n> +\n> +:git-log: 1\n> +include::diff-options.txt[]\n> +\n> +include::diff-generate-patch.txt[]\n> +\n> +\n>  EXAMPLES\n>  --------\n\nThis is a good start; the output should match what you would get for\ngit-log(1) with the above.\n\nBut we would need to say, unlike \"log\" whose default is not to show\nany patch, \"show\" that works on a commit defaults to \"--cc\"\nsomewhere.\n\nOther than that the whole series looks sensible to me.  Thanks.\n"},{"id":"223434","messageId":"7v61wbeuix.fsf@alter.siamese.dyndns.org","threadId":"34439","inReplyTo":"1373893639-13413-3-git-send-email-Matthieu.Moy@imag.fr","subject":"Re: [PATCH 2/5] diff: allow --patch to override -s/--no-patch","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-07-15T15:02:14Z","receivedAt":"2013-07-15T15:02:14Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matthieu Moy <Matthieu.Moy@imag.fr> writes:\n\n> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n> ---\n>  diff.c | 5 +++--\n>  1 file changed, 3 insertions(+), 2 deletions(-)\n>\n> diff --git a/diff.c b/diff.c\n> index 6bd821d..66a6877 100644\n> --- a/diff.c\n> +++ b/diff.c\n> @@ -3515,9 +3515,10 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)\n>  \tint argcount;\n>  \n>  \t/* Output format options */\n> -\tif (!strcmp(arg, \"-p\") || !strcmp(arg, \"-u\") || !strcmp(arg, \"--patch\"))\n> +\tif (!strcmp(arg, \"-p\") || !strcmp(arg, \"-u\") || !strcmp(arg, \"--patch\")) {\n> +\t\toptions->output_format &= ~DIFF_FORMAT_NO_OUTPUT;\n>  \t\toptions->output_format |= DIFF_FORMAT_PATCH;\n> -\telse if (opt_arg(arg, 'U', \"unified\", &options->context))\n> +\t} else if (opt_arg(arg, 'U', \"unified\", &options->context))\n>  \t\toptions->output_format |= DIFF_FORMAT_PATCH;\n>  \telse if (!strcmp(arg, \"--raw\"))\n>  \t\toptions->output_format |= DIFF_FORMAT_RAW;\n\nI am wondering if the difference after this patch between \"-p\" and\n\"-U8\" is deliberate, or just an accident coming from the way the\noriginal was written in ee1e5412 (git diff: support \"-U\" and\n\"--unified\" options properly, 2006-05-13).\n\nIf the original were written in this way:\n\n\tif (!strcmp(arg, \"-p\") || !strcmp(arg, \"-u\") || !strcmp(arg, \"--patch\") ||\n            opt_arg(arg, 'U', \"unified\", &options->context))\n  \t\toptions->output_format |= DIFF_FORMAT_PATCH;\n\nI suspect you would have given the additional\n\n\t\toptions->output_format &= ~DIFF_FORMAT_NO_OUTPUT;\n\nto the whole thing, without singling out \"-U8\".  Or am I missing\nsome good reason why \"--no-patch -U8\" should not produce a patch,\nwhile \"--no-patch -p\" and \"-U8\" should both should?\n"},{"id":"223435","messageId":"7v1u6zeubm.fsf@alter.siamese.dyndns.org","threadId":"34439","inReplyTo":"7va9lneuw5.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 3/5] Documentation/git-show.txt: include common diff options, like git-log.txt","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-07-15T15:06:37Z","receivedAt":"2013-07-15T15:06:37Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Matthieu Moy <Matthieu.Moy@imag.fr> writes:\n>\n>> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n>> ---\n>>  Documentation/git-show.txt | 9 +++++++++\n>>  1 file changed, 9 insertions(+)\n>>\n>> diff --git a/Documentation/git-show.txt b/Documentation/git-show.txt\n>> index ae4edcc..4e617e6 100644\n>> --- a/Documentation/git-show.txt\n>> +++ b/Documentation/git-show.txt\n>> @@ -45,6 +45,15 @@ include::pretty-options.txt[]\n>>  include::pretty-formats.txt[]\n>>  \n>>  \n>> +COMMON DIFF OPTIONS\n>> +-------------------\n>> +\n>> +:git-log: 1\n>> +include::diff-options.txt[]\n>> +\n>> +include::diff-generate-patch.txt[]\n>> +\n>> +\n>>  EXAMPLES\n>>  --------\n>\n> This is a good start; the output should match what you would get for\n> git-log(1) with the above.\n>\n> But we would need to say, unlike \"log\" whose default is not to show\n> any patch, \"show\" that works on a commit defaults to \"--cc\"\n> somewhere.\n>\n> Other than that the whole series looks sensible to me.  Thanks.\n\nActually, we say \"log message and textual diff\" with \"merge commit\n... diff-tree --cc\", so please scratch the above comment (I think we\nshould however stop saying \"in a special format\" there---when the\ncombined diff was invented, the format may have been novelty, but it\nno longer is).\n"},{"id":"223439","messageId":"vpqa9lnderb.fsf@anie.imag.fr","threadId":"34439","inReplyTo":"7v61wbeuix.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 2/5] diff: allow --patch to override -s/--no-patch","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2013-07-15T15:28:08Z","receivedAt":"2013-07-15T15:28:08Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> I am wondering if the difference after this patch between \"-p\" and\n> \"-U8\" is deliberate, or just an accident coming from the way the\n> original was written in ee1e5412 (git diff: support \"-U\" and\n> \"--unified\" options properly, 2006-05-13).\n\nNo, it isn't. I just didn't notice the -U case.\n\n> If the original were written in this way:\n>\n> \tif (!strcmp(arg, \"-p\") || !strcmp(arg, \"-u\") || !strcmp(arg, \"--patch\") ||\n>             opt_arg(arg, 'U', \"unified\", &options->context))\n>   \t\toptions->output_format |= DIFF_FORMAT_PATCH;\n\nYes, this seems to be a better way.\n\nThere are other cases like --patch-with-raw, I'll send a reroll.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"223447","messageId":"7vppujbwuh.fsf@alter.siamese.dyndns.org","threadId":"34439","inReplyTo":"vpqa9lnderb.fsf@anie.imag.fr","subject":"Re: [PATCH 2/5] diff: allow --patch to override -s/--no-patch","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-07-15T16:40:22Z","receivedAt":"2013-07-15T16:40:22Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:\n\n> Junio C Hamano <gitster@pobox.com> writes:\n>\n>> I am wondering if the difference after this patch between \"-p\" and\n>> \"-U8\" is deliberate, or just an accident coming from the way the\n>> original was written in ee1e5412 (git diff: support \"-U\" and\n>> \"--unified\" options properly, 2006-05-13).\n>\n> No, it isn't. I just didn't notice the -U case.\n>\n>> If the original were written in this way:\n>>\n>> \tif (!strcmp(arg, \"-p\") || !strcmp(arg, \"-u\") || !strcmp(arg, \"--patch\") ||\n>>             opt_arg(arg, 'U', \"unified\", &options->context))\n>>   \t\toptions->output_format |= DIFF_FORMAT_PATCH;\n>\n> Yes, this seems to be a better way.\n>\n> There are other cases like --patch-with-raw, I'll send a reroll.\n\nThanks.\n"},{"id":"223454","messageId":"1373907914-8020-1-git-send-email-Matthieu.Moy@imag.fr","threadId":"34439","inReplyTo":"7vppujbwuh.fsf@alter.siamese.dyndns.org","subject":"[PATCH v2 0/5] Make \"git show -s\" easier to discover for users","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2013-07-15T17:05:09Z","receivedAt":"2013-07-15T17:05:09Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"This fixes the issue found by Junio where \"git log --no-patch -u\" was\nshowing the patch, but not \"git log --no-patch -U8\". Other patches are\nunmodified.\n\nMatthieu Moy (5):\n  diff: allow --no-patch as synonym for -s\n  diff: allow --patch & cie to override -s/--no-patch\n  Documentation/git-show.txt: include common diff options, like\n    git-log.txt\n  Documentation: move description of -s, --no-patch to diff-options.txt\n  Documentation/git-log.txt: capitalize section names\n\n Documentation/diff-options.txt     |  5 +++++\n Documentation/git-log.txt          |  8 ++++----\n Documentation/git-show.txt         |  9 +++++++++\n Documentation/rev-list-options.txt |  3 ---\n diff.c                             | 30 ++++++++++++++++++------------\n 5 files changed, 36 insertions(+), 19 deletions(-)\n\n-- \n1.8.3.1.495.g13f33cf.dirty\n"},{"id":"223455","messageId":"1373907914-8020-2-git-send-email-Matthieu.Moy@imag.fr","threadId":"34439","inReplyTo":"1373907914-8020-1-git-send-email-Matthieu.Moy@imag.fr","subject":"[PATCH v2 1/5] diff: allow --no-patch as synonym for -s","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2013-07-15T17:05:10Z","receivedAt":"2013-07-15T17:05:10Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"This follows the usual convention of having a --no-foo option to negate\n--foo.\n\nSigned-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n---\n Documentation/rev-list-options.txt | 1 +\n diff.c                             | 2 +-\n 2 files changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt\nindex e157ec3..c128a85 100644\n--- a/Documentation/rev-list-options.txt\n+++ b/Documentation/rev-list-options.txt\n@@ -851,5 +851,6 @@ options may be given. See linkgit:git-diff-files[1] for more options.\n \tShow the tree objects in the diff output. This implies '-r'.\n \n -s::\n+--no-patch::\n \tSuppress diff output.\n endif::git-rev-list[]\ndiff --git a/diff.c b/diff.c\nindex 6578690..6bd821d 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -3551,7 +3551,7 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)\n \t\toptions->output_format |= DIFF_FORMAT_NAME;\n \telse if (!strcmp(arg, \"--name-status\"))\n \t\toptions->output_format |= DIFF_FORMAT_NAME_STATUS;\n-\telse if (!strcmp(arg, \"-s\"))\n+\telse if (!strcmp(arg, \"-s\") || !strcmp(arg, \"--no-patch\"))\n \t\toptions->output_format |= DIFF_FORMAT_NO_OUTPUT;\n \telse if (!prefixcmp(arg, \"--stat\"))\n \t\t/* --stat, --stat-width, --stat-name-width, or --stat-count */\n-- \n1.8.3.1.495.g13f33cf.dirty\n"},{"id":"223456","messageId":"1373907914-8020-3-git-send-email-Matthieu.Moy@imag.fr","threadId":"34439","inReplyTo":"1373907914-8020-1-git-send-email-Matthieu.Moy@imag.fr","subject":"[PATCH v2 2/5] diff: allow --patch & cie to override -s/--no-patch","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2013-07-15T17:05:11Z","receivedAt":"2013-07-15T17:05:11Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"All options that trigger a patch output now override --no-patch.\n\nThe case of --binary is particular as the name may suggest that it turns\na normal patch into a binary patch, but it actually already enables patch\noutput when normally disabled (e.g. \"git log --binary\" displays a patch),\nhence it makes sense that \"git show --no-patch --binary\" display the\nbinary patch.\n\nSigned-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n---\nThis is the one which changed.\n\n diff.c | 28 +++++++++++++++++-----------\n 1 file changed, 17 insertions(+), 11 deletions(-)\n\ndiff --git a/diff.c b/diff.c\nindex 6bd821d..66ab714 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -3508,6 +3508,11 @@ static int parse_submodule_opt(struct diff_options *options, const char *value)\n \treturn 1;\n }\n \n+static void enable_patch_output(int *fmt) {\n+\t*fmt &= ~DIFF_FORMAT_NO_OUTPUT;\n+\t*fmt |= DIFF_FORMAT_PATCH;\n+}\n+\n int diff_opt_parse(struct diff_options *options, const char **av, int ac)\n {\n \tconst char *arg = av[0];\n@@ -3515,15 +3520,15 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)\n \tint argcount;\n \n \t/* Output format options */\n-\tif (!strcmp(arg, \"-p\") || !strcmp(arg, \"-u\") || !strcmp(arg, \"--patch\"))\n-\t\toptions->output_format |= DIFF_FORMAT_PATCH;\n-\telse if (opt_arg(arg, 'U', \"unified\", &options->context))\n-\t\toptions->output_format |= DIFF_FORMAT_PATCH;\n+\tif (!strcmp(arg, \"-p\") || !strcmp(arg, \"-u\") || !strcmp(arg, \"--patch\")\n+\t    || opt_arg(arg, 'U', \"unified\", &options->context))\n+\t\tenable_patch_output(&options->output_format);\n \telse if (!strcmp(arg, \"--raw\"))\n \t\toptions->output_format |= DIFF_FORMAT_RAW;\n-\telse if (!strcmp(arg, \"--patch-with-raw\"))\n-\t\toptions->output_format |= DIFF_FORMAT_PATCH | DIFF_FORMAT_RAW;\n-\telse if (!strcmp(arg, \"--numstat\"))\n+\telse if (!strcmp(arg, \"--patch-with-raw\")) {\n+\t\tenable_patch_output(&options->output_format);\n+\t\toptions->output_format |= DIFF_FORMAT_RAW;\n+\t} else if (!strcmp(arg, \"--numstat\"))\n \t\toptions->output_format |= DIFF_FORMAT_NUMSTAT;\n \telse if (!strcmp(arg, \"--shortstat\"))\n \t\toptions->output_format |= DIFF_FORMAT_SHORTSTAT;\n@@ -3545,9 +3550,10 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)\n \t\toptions->output_format |= DIFF_FORMAT_CHECKDIFF;\n \telse if (!strcmp(arg, \"--summary\"))\n \t\toptions->output_format |= DIFF_FORMAT_SUMMARY;\n-\telse if (!strcmp(arg, \"--patch-with-stat\"))\n-\t\toptions->output_format |= DIFF_FORMAT_PATCH | DIFF_FORMAT_DIFFSTAT;\n-\telse if (!strcmp(arg, \"--name-only\"))\n+\telse if (!strcmp(arg, \"--patch-with-stat\")) {\n+\t\tenable_patch_output(&options->output_format);\n+\t\toptions->output_format |= DIFF_FORMAT_DIFFSTAT;\n+\t} else if (!strcmp(arg, \"--name-only\"))\n \t\toptions->output_format |= DIFF_FORMAT_NAME;\n \telse if (!strcmp(arg, \"--name-status\"))\n \t\toptions->output_format |= DIFF_FORMAT_NAME_STATUS;\n@@ -3624,7 +3630,7 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)\n \n \t/* flags options */\n \telse if (!strcmp(arg, \"--binary\")) {\n-\t\toptions->output_format |= DIFF_FORMAT_PATCH;\n+\t\tenable_patch_output(&options->output_format);\n \t\tDIFF_OPT_SET(options, BINARY);\n \t}\n \telse if (!strcmp(arg, \"--full-index\"))\n-- \n1.8.3.1.495.g13f33cf.dirty\n"},{"id":"223451","messageId":"1373907914-8020-4-git-send-email-Matthieu.Moy@imag.fr","threadId":"34439","inReplyTo":"1373907914-8020-1-git-send-email-Matthieu.Moy@imag.fr","subject":"[PATCH v2 3/5] Documentation/git-show.txt: include common diff options, like git-log.txt","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2013-07-15T17:05:12Z","receivedAt":"2013-07-15T17:05:12Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n---\n Documentation/git-show.txt | 9 +++++++++\n 1 file changed, 9 insertions(+)\n\ndiff --git a/Documentation/git-show.txt b/Documentation/git-show.txt\nindex ae4edcc..4e617e6 100644\n--- a/Documentation/git-show.txt\n+++ b/Documentation/git-show.txt\n@@ -45,6 +45,15 @@ include::pretty-options.txt[]\n include::pretty-formats.txt[]\n \n \n+COMMON DIFF OPTIONS\n+-------------------\n+\n+:git-log: 1\n+include::diff-options.txt[]\n+\n+include::diff-generate-patch.txt[]\n+\n+\n EXAMPLES\n --------\n \n-- \n1.8.3.1.495.g13f33cf.dirty\n"},{"id":"223453","messageId":"1373907914-8020-5-git-send-email-Matthieu.Moy@imag.fr","threadId":"34439","inReplyTo":"1373907914-8020-1-git-send-email-Matthieu.Moy@imag.fr","subject":"[PATCH v2 4/5] Documentation: move description of -s, --no-patch to diff-options.txt","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2013-07-15T17:05:13Z","receivedAt":"2013-07-15T17:05:13Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"Technically, \"-s, --no-patch\" is implemented in diff.c (\"git diff\n--no-patch\" is essentially useless, but valid). From the user point of\nview, this allows the documentation to show up in \"git show --help\",\nwhich is one of the most useful use of the option.\n\nWhile we're there, add a sentence explaining why the option can be\nuseful.\n\nSigned-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n---\n Documentation/diff-options.txt     | 5 +++++\n Documentation/rev-list-options.txt | 4 ----\n 2 files changed, 5 insertions(+), 4 deletions(-)\n\ndiff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt\nindex 87e92d6..bbed2cd 100644\n--- a/Documentation/diff-options.txt\n+++ b/Documentation/diff-options.txt\n@@ -26,6 +26,11 @@ ifndef::git-format-patch[]\n \t{git-diff? This is the default.}\n endif::git-format-patch[]\n \n+-s::\n+--no-patch::\n+\tSuppress diff output. Useful for commands like `git show` that\n+\tshow the patch by default, or to cancel the effect of `--patch`.\n+\n -U<n>::\n --unified=<n>::\n \tGenerate diffs with <n> lines of context instead of\ndiff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt\nindex c128a85..e632e85 100644\n--- a/Documentation/rev-list-options.txt\n+++ b/Documentation/rev-list-options.txt\n@@ -849,8 +849,4 @@ options may be given. See linkgit:git-diff-files[1] for more options.\n -t::\n \n \tShow the tree objects in the diff output. This implies '-r'.\n-\n--s::\n---no-patch::\n-\tSuppress diff output.\n endif::git-rev-list[]\n-- \n1.8.3.1.495.g13f33cf.dirty\n"},{"id":"223452","messageId":"1373907914-8020-6-git-send-email-Matthieu.Moy@imag.fr","threadId":"34439","inReplyTo":"1373907914-8020-1-git-send-email-Matthieu.Moy@imag.fr","subject":"[PATCH v2 5/5] Documentation/git-log.txt: capitalize section names","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2013-07-15T17:05:14Z","receivedAt":"2013-07-15T17:05:14Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"This is the convention in other files and even at the beginning of git-log.txt\n\nSigned-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n---\n Documentation/git-log.txt | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/Documentation/git-log.txt b/Documentation/git-log.txt\nindex 2ea79ba..2eda5e4 100644\n--- a/Documentation/git-log.txt\n+++ b/Documentation/git-log.txt\n@@ -97,7 +97,7 @@ include::rev-list-options.txt[]\n \n include::pretty-formats.txt[]\n \n-Common diff options\n+COMMON DIFF OPTIONS\n -------------------\n \n :git-log: 1\n@@ -105,7 +105,7 @@ include::diff-options.txt[]\n \n include::diff-generate-patch.txt[]\n \n-Examples\n+EXAMPLES\n --------\n `git log --no-merges`::\n \n@@ -161,12 +161,12 @@ git log -L '/int main/',/^}/:main.c::\n `git log -3`::\n \tLimits the number of commits to show to 3.\n \n-Discussion\n+DISCUSSION\n ----------\n \n include::i18n.txt[]\n \n-Configuration\n+CONFIGURATION\n -------------\n \n See linkgit:git-config[1] for core variables and linkgit:git-diff[1]\n-- \n1.8.3.1.495.g13f33cf.dirty\n"},{"id":"223457","messageId":"20130715173536.GB14690@google.com","threadId":"34439","inReplyTo":"1373907914-8020-2-git-send-email-Matthieu.Moy@imag.fr","subject":"Re: [PATCH v2 1/5] diff: allow --no-patch as synonym for -s","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-07-15T17:35:36Z","receivedAt":"2013-07-15T17:35:36Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Matthieu Moy wrote:\n\n> --- a/diff.c\n> +++ b/diff.c\n> @@ -3551,7 +3551,7 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)\n>  \t\toptions->output_format |= DIFF_FORMAT_NAME;\n>  \telse if (!strcmp(arg, \"--name-status\"))\n>  \t\toptions->output_format |= DIFF_FORMAT_NAME_STATUS;\n> -\telse if (!strcmp(arg, \"-s\"))\n> +\telse if (!strcmp(arg, \"-s\") || !strcmp(arg, \"--no-patch\"))\n>  \t\toptions->output_format |= DIFF_FORMAT_NO_OUTPUT;\n\nVery nice idea.\n\nTests?  E.g.:\n\ndiff --git i/t/t4000-diff-format.sh w/t/t4000-diff-format.sh\nindex 6ddd469..0fa7380 100755\n--- i/t/t4000-diff-format.sh\n+++ w/t/t4000-diff-format.sh\n@@ -59,4 +59,18 @@ test_expect_success \\\n     'validate git diff-files -p output.' \\\n     'compare_diff_patch current expected'\n \n+test_expect_success \\\n+    'git diff-files -s after editing work tree' \\\n+    '>empty &&\n+    git diff-files -s >diff-s-output 2>err &&\n+    test_cmp empty diff-s-output &&\n+    test_cmp empty err'\n+\n+test_expect_success \\\n+    'git diff-files --no-patch as synonym for -s' \\\n+    '>empty &&\n+    git diff-files --no-patch >diff-np-output 2>err &&\n+    test_cmp empty diff-np-output &&\n+    test_cmp empty err'\n+\n test_done\n"},{"id":"223463","messageId":"1373910925-18422-1-git-send-email-Matthieu.Moy@imag.fr","threadId":"34439","inReplyTo":"20130715173536.GB14690@google.com","subject":"[PATCH v3 0/6] Make \"git show -s\" easier to discover for users","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2013-07-15T17:55:19Z","receivedAt":"2013-07-15T17:55:19Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"Compared to v2, I just added tests. Strongly inspired from Jonathan's,\nbut there's one more, and I chose the \"modern\" indentation style\n(hence a clean-up patch before, to avoid mixed-style in the same file).\n\nMatthieu Moy (6):\n  t4000-diff-format.sh: modernize style\n  diff: allow --no-patch as synonym for -s\n  diff: allow --patch & cie to override -s/--no-patch\n  Documentation/git-show.txt: include common diff options, like\n    git-log.txt\n  Documentation: move description of -s, --no-patch to diff-options.txt\n  Documentation/git-log.txt: capitalize section names\n\n Documentation/diff-options.txt     |  5 +++++\n Documentation/git-log.txt          |  8 ++++----\n Documentation/git-show.txt         |  9 +++++++++\n Documentation/rev-list-options.txt |  3 ---\n diff.c                             | 30 ++++++++++++++++++------------\n t/t4000-diff-format.sh             | 35 ++++++++++++++++++++++++++---------\n 6 files changed, 62 insertions(+), 28 deletions(-)\n\n-- \n1.8.3.1.495.g13f33cf.dirty\n"},{"id":"223464","messageId":"1373910925-18422-2-git-send-email-Matthieu.Moy@imag.fr","threadId":"34439","inReplyTo":"1373910925-18422-1-git-send-email-Matthieu.Moy@imag.fr","subject":"[PATCH v3 1/6] t4000-diff-format.sh: modernize style","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2013-07-15T17:55:20Z","receivedAt":"2013-07-15T17:55:20Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n---\n t/t4000-diff-format.sh | 18 +++++++++---------\n 1 file changed, 9 insertions(+), 9 deletions(-)\n\ndiff --git a/t/t4000-diff-format.sh b/t/t4000-diff-format.sh\nindex 6ddd469..2b5dffc 100755\n--- a/t/t4000-diff-format.sh\n+++ b/t/t4000-diff-format.sh\n@@ -15,17 +15,17 @@ line 3'\n cat path0 >path1\n chmod +x path1\n \n-test_expect_success \\\n-    'update-index --add two files with and without +x.' \\\n-    'git update-index --add path0 path1'\n+test_expect_success 'update-index --add two files with and without +x.' '\n+\tgit update-index --add path0 path1\n+'\n \n mv path0 path0-\n sed -e 's/line/Line/' <path0- >path0\n chmod +x path0\n rm -f path1\n-test_expect_success \\\n-    'git diff-files -p after editing work tree.' \\\n-    'git diff-files -p >current'\n+test_expect_success 'git diff-files -p after editing work tree.' '\n+\tgit diff-files -p >actual\n+'\n \n # that's as far as it comes\n if [ \"$(git config --get core.filemode)\" = false ]\n@@ -55,8 +55,8 @@ deleted file mode 100755\n -line 3\n EOF\n \n-test_expect_success \\\n-    'validate git diff-files -p output.' \\\n-    'compare_diff_patch current expected'\n+test_expect_success 'validate git diff-files -p output.' '\n+\tcompare_diff_patch expected actual\n+'\n \n test_done\n-- \n1.8.3.1.495.g13f33cf.dirty\n"},{"id":"223468","messageId":"1373910925-18422-3-git-send-email-Matthieu.Moy@imag.fr","threadId":"34439","inReplyTo":"1373910925-18422-1-git-send-email-Matthieu.Moy@imag.fr","subject":"[PATCH v3 2/6] diff: allow --no-patch as synonym for -s","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2013-07-15T17:55:21Z","receivedAt":"2013-07-15T17:55:21Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"This follows the usual convention of having a --no-foo option to negate\n--foo.\n\nSigned-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n---\n Documentation/rev-list-options.txt |  1 +\n diff.c                             |  2 +-\n t/t4000-diff-format.sh             | 12 ++++++++++++\n 3 files changed, 14 insertions(+), 1 deletion(-)\n\ndiff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt\nindex e157ec3..c128a85 100644\n--- a/Documentation/rev-list-options.txt\n+++ b/Documentation/rev-list-options.txt\n@@ -851,5 +851,6 @@ options may be given. See linkgit:git-diff-files[1] for more options.\n \tShow the tree objects in the diff output. This implies '-r'.\n \n -s::\n+--no-patch::\n \tSuppress diff output.\n endif::git-rev-list[]\ndiff --git a/diff.c b/diff.c\nindex 6578690..6bd821d 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -3551,7 +3551,7 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)\n \t\toptions->output_format |= DIFF_FORMAT_NAME;\n \telse if (!strcmp(arg, \"--name-status\"))\n \t\toptions->output_format |= DIFF_FORMAT_NAME_STATUS;\n-\telse if (!strcmp(arg, \"-s\"))\n+\telse if (!strcmp(arg, \"-s\") || !strcmp(arg, \"--no-patch\"))\n \t\toptions->output_format |= DIFF_FORMAT_NO_OUTPUT;\n \telse if (!prefixcmp(arg, \"--stat\"))\n \t\t/* --stat, --stat-width, --stat-name-width, or --stat-count */\ndiff --git a/t/t4000-diff-format.sh b/t/t4000-diff-format.sh\nindex 2b5dffc..d702575 100755\n--- a/t/t4000-diff-format.sh\n+++ b/t/t4000-diff-format.sh\n@@ -59,4 +59,16 @@ test_expect_success 'validate git diff-files -p output.' '\n \tcompare_diff_patch expected actual\n '\n \n+test_expect_success 'git diff-files -s after editing work tree' '\n+\tgit diff-files -s >diff-s-output 2>err &&\n+\ttest_must_be_empty diff-s-output &&\n+\ttest_must_be_empty err\n+'\n+\n+test_expect_success 'git diff-files --no-patch as synonym for -s' '\n+\tgit diff-files --no-patch >diff-np-output 2>err &&\n+\ttest_must_be_empty diff-np-output &&\n+\ttest_must_be_empty err\n+'\n+\n test_done\n-- \n1.8.3.1.495.g13f33cf.dirty\n"},{"id":"223465","messageId":"1373910925-18422-4-git-send-email-Matthieu.Moy@imag.fr","threadId":"34439","inReplyTo":"1373910925-18422-1-git-send-email-Matthieu.Moy@imag.fr","subject":"[PATCH v3 3/6] diff: allow --patch & cie to override -s/--no-patch","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2013-07-15T17:55:22Z","receivedAt":"2013-07-15T17:55:22Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"All options that trigger a patch output now override --no-patch.\n\nThe case of --binary is particular as the name may suggest that it turns\na normal patch into a binary patch, but it actually already enables patch\noutput when normally disabled (e.g. \"git log --binary\" displays a patch),\nhence it makes sense that \"git show --no-patch --binary\" display the\nbinary patch.\n\nSigned-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n---\n diff.c                 | 28 +++++++++++++++++-----------\n t/t4000-diff-format.sh |  5 +++++\n 2 files changed, 22 insertions(+), 11 deletions(-)\n\ndiff --git a/diff.c b/diff.c\nindex 6bd821d..66ab714 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -3508,6 +3508,11 @@ static int parse_submodule_opt(struct diff_options *options, const char *value)\n \treturn 1;\n }\n \n+static void enable_patch_output(int *fmt) {\n+\t*fmt &= ~DIFF_FORMAT_NO_OUTPUT;\n+\t*fmt |= DIFF_FORMAT_PATCH;\n+}\n+\n int diff_opt_parse(struct diff_options *options, const char **av, int ac)\n {\n \tconst char *arg = av[0];\n@@ -3515,15 +3520,15 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)\n \tint argcount;\n \n \t/* Output format options */\n-\tif (!strcmp(arg, \"-p\") || !strcmp(arg, \"-u\") || !strcmp(arg, \"--patch\"))\n-\t\toptions->output_format |= DIFF_FORMAT_PATCH;\n-\telse if (opt_arg(arg, 'U', \"unified\", &options->context))\n-\t\toptions->output_format |= DIFF_FORMAT_PATCH;\n+\tif (!strcmp(arg, \"-p\") || !strcmp(arg, \"-u\") || !strcmp(arg, \"--patch\")\n+\t    || opt_arg(arg, 'U', \"unified\", &options->context))\n+\t\tenable_patch_output(&options->output_format);\n \telse if (!strcmp(arg, \"--raw\"))\n \t\toptions->output_format |= DIFF_FORMAT_RAW;\n-\telse if (!strcmp(arg, \"--patch-with-raw\"))\n-\t\toptions->output_format |= DIFF_FORMAT_PATCH | DIFF_FORMAT_RAW;\n-\telse if (!strcmp(arg, \"--numstat\"))\n+\telse if (!strcmp(arg, \"--patch-with-raw\")) {\n+\t\tenable_patch_output(&options->output_format);\n+\t\toptions->output_format |= DIFF_FORMAT_RAW;\n+\t} else if (!strcmp(arg, \"--numstat\"))\n \t\toptions->output_format |= DIFF_FORMAT_NUMSTAT;\n \telse if (!strcmp(arg, \"--shortstat\"))\n \t\toptions->output_format |= DIFF_FORMAT_SHORTSTAT;\n@@ -3545,9 +3550,10 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)\n \t\toptions->output_format |= DIFF_FORMAT_CHECKDIFF;\n \telse if (!strcmp(arg, \"--summary\"))\n \t\toptions->output_format |= DIFF_FORMAT_SUMMARY;\n-\telse if (!strcmp(arg, \"--patch-with-stat\"))\n-\t\toptions->output_format |= DIFF_FORMAT_PATCH | DIFF_FORMAT_DIFFSTAT;\n-\telse if (!strcmp(arg, \"--name-only\"))\n+\telse if (!strcmp(arg, \"--patch-with-stat\")) {\n+\t\tenable_patch_output(&options->output_format);\n+\t\toptions->output_format |= DIFF_FORMAT_DIFFSTAT;\n+\t} else if (!strcmp(arg, \"--name-only\"))\n \t\toptions->output_format |= DIFF_FORMAT_NAME;\n \telse if (!strcmp(arg, \"--name-status\"))\n \t\toptions->output_format |= DIFF_FORMAT_NAME_STATUS;\n@@ -3624,7 +3630,7 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)\n \n \t/* flags options */\n \telse if (!strcmp(arg, \"--binary\")) {\n-\t\toptions->output_format |= DIFF_FORMAT_PATCH;\n+\t\tenable_patch_output(&options->output_format);\n \t\tDIFF_OPT_SET(options, BINARY);\n \t}\n \telse if (!strcmp(arg, \"--full-index\"))\ndiff --git a/t/t4000-diff-format.sh b/t/t4000-diff-format.sh\nindex d702575..4fce12f 100755\n--- a/t/t4000-diff-format.sh\n+++ b/t/t4000-diff-format.sh\n@@ -71,4 +71,9 @@ test_expect_success 'git diff-files --no-patch as synonym for -s' '\n \ttest_must_be_empty err\n '\n \n+test_expect_success 'git diff-files --no-patch --patch shows the patch' '\n+\tgit diff-files --no-patch --patch >diff-np-output 2>err &&\n+\tcompare_diff_patch expected actual\n+'\n+\n test_done\n-- \n1.8.3.1.495.g13f33cf.dirty\n"},{"id":"223467","messageId":"1373910925-18422-5-git-send-email-Matthieu.Moy@imag.fr","threadId":"34439","inReplyTo":"1373910925-18422-1-git-send-email-Matthieu.Moy@imag.fr","subject":"[PATCH v3 4/6] Documentation/git-show.txt: include common diff options, like git-log.txt","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2013-07-15T17:55:23Z","receivedAt":"2013-07-15T17:55:23Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n---\n Documentation/git-show.txt | 9 +++++++++\n 1 file changed, 9 insertions(+)\n\ndiff --git a/Documentation/git-show.txt b/Documentation/git-show.txt\nindex ae4edcc..4e617e6 100644\n--- a/Documentation/git-show.txt\n+++ b/Documentation/git-show.txt\n@@ -45,6 +45,15 @@ include::pretty-options.txt[]\n include::pretty-formats.txt[]\n \n \n+COMMON DIFF OPTIONS\n+-------------------\n+\n+:git-log: 1\n+include::diff-options.txt[]\n+\n+include::diff-generate-patch.txt[]\n+\n+\n EXAMPLES\n --------\n \n-- \n1.8.3.1.495.g13f33cf.dirty\n"},{"id":"223469","messageId":"1373910925-18422-6-git-send-email-Matthieu.Moy@imag.fr","threadId":"34439","inReplyTo":"1373910925-18422-1-git-send-email-Matthieu.Moy@imag.fr","subject":"[PATCH v3 5/6] Documentation: move description of -s, --no-patch to diff-options.txt","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2013-07-15T17:55:24Z","receivedAt":"2013-07-15T17:55:24Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"Technically, \"-s, --no-patch\" is implemented in diff.c (\"git diff\n--no-patch\" is essentially useless, but valid). From the user point of\nview, this allows the documentation to show up in \"git show --help\",\nwhich is one of the most useful use of the option.\n\nWhile we're there, add a sentence explaining why the option can be\nuseful.\n\nSigned-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n---\n Documentation/diff-options.txt     | 5 +++++\n Documentation/rev-list-options.txt | 4 ----\n 2 files changed, 5 insertions(+), 4 deletions(-)\n\ndiff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt\nindex 87e92d6..bbed2cd 100644\n--- a/Documentation/diff-options.txt\n+++ b/Documentation/diff-options.txt\n@@ -26,6 +26,11 @@ ifndef::git-format-patch[]\n \t{git-diff? This is the default.}\n endif::git-format-patch[]\n \n+-s::\n+--no-patch::\n+\tSuppress diff output. Useful for commands like `git show` that\n+\tshow the patch by default, or to cancel the effect of `--patch`.\n+\n -U<n>::\n --unified=<n>::\n \tGenerate diffs with <n> lines of context instead of\ndiff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt\nindex c128a85..e632e85 100644\n--- a/Documentation/rev-list-options.txt\n+++ b/Documentation/rev-list-options.txt\n@@ -849,8 +849,4 @@ options may be given. See linkgit:git-diff-files[1] for more options.\n -t::\n \n \tShow the tree objects in the diff output. This implies '-r'.\n-\n--s::\n---no-patch::\n-\tSuppress diff output.\n endif::git-rev-list[]\n-- \n1.8.3.1.495.g13f33cf.dirty\n"},{"id":"223466","messageId":"1373910925-18422-7-git-send-email-Matthieu.Moy@imag.fr","threadId":"34439","inReplyTo":"1373910925-18422-1-git-send-email-Matthieu.Moy@imag.fr","subject":"[PATCH v3 6/6] Documentation/git-log.txt: capitalize section names","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2013-07-15T17:55:25Z","receivedAt":"2013-07-15T17:55:25Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"This is the convention in other files and even at the beginning of git-log.txt\n\nSigned-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n---\n Documentation/git-log.txt | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/Documentation/git-log.txt b/Documentation/git-log.txt\nindex 2ea79ba..2eda5e4 100644\n--- a/Documentation/git-log.txt\n+++ b/Documentation/git-log.txt\n@@ -97,7 +97,7 @@ include::rev-list-options.txt[]\n \n include::pretty-formats.txt[]\n \n-Common diff options\n+COMMON DIFF OPTIONS\n -------------------\n \n :git-log: 1\n@@ -105,7 +105,7 @@ include::diff-options.txt[]\n \n include::diff-generate-patch.txt[]\n \n-Examples\n+EXAMPLES\n --------\n `git log --no-merges`::\n \n@@ -161,12 +161,12 @@ git log -L '/int main/',/^}/:main.c::\n `git log -3`::\n \tLimits the number of commits to show to 3.\n \n-Discussion\n+DISCUSSION\n ----------\n \n include::i18n.txt[]\n \n-Configuration\n+CONFIGURATION\n -------------\n \n See linkgit:git-config[1] for core variables and linkgit:git-diff[1]\n-- \n1.8.3.1.495.g13f33cf.dirty\n"},{"id":"223470","messageId":"20130715180009.GD14690@google.com","threadId":"34439","inReplyTo":"1373910925-18422-2-git-send-email-Matthieu.Moy@imag.fr","subject":"Re: [PATCH v3 1/6] t4000-diff-format.sh: modernize style","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-07-15T18:00:09Z","receivedAt":"2013-07-15T18:00:09Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Matthieu Moy wrote:\n\n> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n> ---\n>  t/t4000-diff-format.sh | 18 +++++++++---------\n>  1 file changed, 9 insertions(+), 9 deletions(-)\n\nThis test script can use more cleanup, but as preparation for later\npatches in this series the above is enough. :)  If I forget to do more\ncleanup as a followup, feel free to kick me.\n\nReviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n"},{"id":"223471","messageId":"20130715180908.GE14690@google.com","threadId":"34439","inReplyTo":"1373910925-18422-4-git-send-email-Matthieu.Moy@imag.fr","subject":"Re: [PATCH v3 3/6] diff: allow --patch & cie to override -s/--no-patch","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-07-15T18:09:09Z","receivedAt":"2013-07-15T18:09:09Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Matthieu Moy wrote:\n\n> All options that trigger a patch output now override --no-patch.\n>\n> The case of --binary is particular as the name may suggest that it turns\n\nUsage nit: this should say \"is unusual\" or \"In the case of --binary in\nparticular, the name may suggest ...\".\n\n> a normal patch into a binary patch, but it actually already enables patch\n> output when normally disabled (e.g. \"git log --binary\" displays a patch),\n> hence it makes sense that \"git show --no-patch --binary\" display the\n> binary patch.\n[...]\n> --- a/t/t4000-diff-format.sh\n> +++ b/t/t4000-diff-format.sh\n> @@ -71,4 +71,9 @@ test_expect_success 'git diff-files --no-patch as synonym for -s' '\n>  \ttest_must_be_empty err\n>  '\n>  \n> +test_expect_success 'git diff-files --no-patch --patch shows the patch' '\n> +\tgit diff-files --no-patch --patch >diff-np-output 2>err &&\n> +\tcompare_diff_patch expected actual\n\nShouldn't that be \"compare_diff_patch expected diff-np-output\"?\n\nA couple of other test ideas:\n\n - \"git diff-files --patch --no-patch\"\n - \"git diff-files -s --patch-with-stat\"\n\nAside from that, the patch looks good.\n\nThanks,\nJonathan\n"},{"id":"223473","messageId":"20130715181713.GG14690@google.com","threadId":"34439","inReplyTo":"1373910925-18422-7-git-send-email-Matthieu.Moy@imag.fr","subject":"Re: [PATCH v3 6/6] Documentation/git-log.txt: capitalize section names","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-07-15T18:17:13Z","receivedAt":"2013-07-15T18:17:13Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Matthieu Moy wrote:\n\n> This is the convention in other files and even at the beginning of git-log.txt\n\nThe docs aren't so consistent on this, but I agree that it makes sense\nto at least be consistent within the generated git-log.html. :)\n\nGenerally the series looks very good.  Thanks for taking this on.\n"},{"id":"223474","messageId":"vpqvc4badhf.fsf@anie.imag.fr","threadId":"34439","inReplyTo":"20130715180908.GE14690@google.com","subject":"Re: [PATCH v3 3/6] diff: allow --patch & cie to override -s/--no-patch","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2013-07-15T18:23:56Z","receivedAt":"2013-07-15T18:23:56Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Jonathan Nieder <jrnieder@gmail.com> writes:\n\n> Matthieu Moy wrote:\n>\n>> All options that trigger a patch output now override --no-patch.\n>>\n>> The case of --binary is particular as the name may suggest that it turns\n>\n> Usage nit: this should say \"is unusual\" \n\nI don't get it. The point is not that --binary is unusual, but that it\nis a particular case that deserves extra attention.\n\n> or \"In the case of --binary in particular, the name may suggest ...\".\n\nNot really. I'd use \"in particular\" if --binary was a sub-case of the\nothers, but here I'm precisely saying that it may not be.\n\n>> --- a/t/t4000-diff-format.sh\n>> +++ b/t/t4000-diff-format.sh\n>> @@ -71,4 +71,9 @@ test_expect_success 'git diff-files --no-patch as synonym for -s' '\n>>  \ttest_must_be_empty err\n>>  '\n>>  \n>> +test_expect_success 'git diff-files --no-patch --patch shows the patch' '\n>> +\tgit diff-files --no-patch --patch >diff-np-output 2>err &&\n>> +\tcompare_diff_patch expected actual\n>\n> Shouldn't that be \"compare_diff_patch expected diff-np-output\"?\n\nOops, right.\n\n> A couple of other test ideas:\n>\n>  - \"git diff-files --patch --no-patch\"\n>  - \"git diff-files -s --patch-with-stat\"\n\nI'd rather avoid having a too long list here, or we'll end-up testing\nall combinations of options ...\n\nI'll send a reroll tomorrow.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"223475","messageId":"20130715185843.GH14690@google.com","threadId":"34439","inReplyTo":"vpqvc4badhf.fsf@anie.imag.fr","subject":"Re: [PATCH v3 3/6] diff: allow --patch & cie to override -s/--no-patch","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-07-15T18:58:43Z","receivedAt":"2013-07-15T18:58:43Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Matthieu Moy wrote:\n> Jonathan Nieder <jrnieder@gmail.com> writes:\n>> Matthieu Moy wrote:\n\n>>> All options that trigger a patch output now override --no-patch.\n>>>\n>>> The case of --binary is particular as the name may suggest that it turns\n>>\n>> Usage nit: this should say \"is unusual\" \n>\n> I don't get it. The point is not that --binary is unusual, but that it\n> is a particular case that deserves extra attention.\n\nAh, so you mean: \"The case of --binary deserves extra attention\nbecause ...\".\n\n\"is particular\" would be an unusual expression, meaning something like\n\"is made of particles\".  It's a weird case in English usage where a\nword commonly appears attached to a noun (\"This particular case\") but\ncannot be used as the RHS of \"is\" (\"This case is particular\").\n\n[...]\n>> A couple of other test ideas:\n>>\n>>  - \"git diff-files --patch --no-patch\"\n>>  - \"git diff-files -s --patch-with-stat\"\n>\n> I'd rather avoid having a too long list here, or we'll end-up testing\n> all combinations of options ...\n\nSure.  The point of \"--patch --no-patch\" is to test that ordering is\nrespected.  The point of \"--no-patch --patch-with-stat\" is so we\nremember that there are options other than --patch that should\noverride --no-patch, for example if this code is ever converted to\nparse_options some day.\n\n> I'll send a reroll tomorrow.\n\nThanks for the quick and thoughtful work.\n"},{"id":"223509","messageId":"1373961940-31614-1-git-send-email-Matthieu.Moy@imag.fr","threadId":"34439","inReplyTo":"20130715185843.GH14690@google.com","subject":"[PATCH v4 0/6] Make \"git show -s\" easier to discover for users","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2013-07-16T08:05:34Z","receivedAt":"2013-07-16T08:05:34Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"One real fix since v3: there was an incorrect file name in a test\n(noticed by Jonathan). Now, all actual outputs are called \"actual\".\n\nOther than that: extra tests, and style fixes in commit messages.\n\nMatthieu Moy (6):\n  t4000-diff-format.sh: modernize style\n  diff: allow --no-patch as synonym for -s\n  diff: allow --patch & cie to override -s/--no-patch\n  Documentation/git-show.txt: include common diff options, like\n    git-log.txt\n  Documentation: move description of -s, --no-patch to diff-options.txt\n  Documentation/git-log.txt: capitalize section names\n\n Documentation/diff-options.txt     |  5 ++++\n Documentation/git-log.txt          |  8 +++----\n Documentation/git-show.txt         |  9 +++++++\n Documentation/rev-list-options.txt |  3 ---\n diff.c                             | 30 ++++++++++++++----------\n t/t4000-diff-format.sh             | 48 +++++++++++++++++++++++++++++++-------\n 6 files changed, 75 insertions(+), 28 deletions(-)\n\n-- \n1.8.3.1.495.g13f33cf.dirty\n"},{"id":"223510","messageId":"1373961940-31614-2-git-send-email-Matthieu.Moy@imag.fr","threadId":"34439","inReplyTo":"1373961940-31614-1-git-send-email-Matthieu.Moy@imag.fr","subject":"[PATCH v4 1/6] t4000-diff-format.sh: modernize style","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2013-07-16T08:05:35Z","receivedAt":"2013-07-16T08:05:35Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n---\n t/t4000-diff-format.sh | 18 +++++++++---------\n 1 file changed, 9 insertions(+), 9 deletions(-)\n\ndiff --git a/t/t4000-diff-format.sh b/t/t4000-diff-format.sh\nindex 6ddd469..2b5dffc 100755\n--- a/t/t4000-diff-format.sh\n+++ b/t/t4000-diff-format.sh\n@@ -15,17 +15,17 @@ line 3'\n cat path0 >path1\n chmod +x path1\n \n-test_expect_success \\\n-    'update-index --add two files with and without +x.' \\\n-    'git update-index --add path0 path1'\n+test_expect_success 'update-index --add two files with and without +x.' '\n+\tgit update-index --add path0 path1\n+'\n \n mv path0 path0-\n sed -e 's/line/Line/' <path0- >path0\n chmod +x path0\n rm -f path1\n-test_expect_success \\\n-    'git diff-files -p after editing work tree.' \\\n-    'git diff-files -p >current'\n+test_expect_success 'git diff-files -p after editing work tree.' '\n+\tgit diff-files -p >actual\n+'\n \n # that's as far as it comes\n if [ \"$(git config --get core.filemode)\" = false ]\n@@ -55,8 +55,8 @@ deleted file mode 100755\n -line 3\n EOF\n \n-test_expect_success \\\n-    'validate git diff-files -p output.' \\\n-    'compare_diff_patch current expected'\n+test_expect_success 'validate git diff-files -p output.' '\n+\tcompare_diff_patch expected actual\n+'\n \n test_done\n-- \n1.8.3.1.495.g13f33cf.dirty\n"},{"id":"223505","messageId":"1373961940-31614-3-git-send-email-Matthieu.Moy@imag.fr","threadId":"34439","inReplyTo":"1373961940-31614-1-git-send-email-Matthieu.Moy@imag.fr","subject":"[PATCH v4 2/6] diff: allow --no-patch as synonym for -s","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2013-07-16T08:05:36Z","receivedAt":"2013-07-16T08:05:36Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"This follows the usual convention of having a --no-foo option to negate\n--foo.\n\nSigned-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n---\n Documentation/rev-list-options.txt |  1 +\n diff.c                             |  2 +-\n t/t4000-diff-format.sh             | 12 ++++++++++++\n 3 files changed, 14 insertions(+), 1 deletion(-)\n\ndiff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt\nindex e157ec3..c128a85 100644\n--- a/Documentation/rev-list-options.txt\n+++ b/Documentation/rev-list-options.txt\n@@ -851,5 +851,6 @@ options may be given. See linkgit:git-diff-files[1] for more options.\n \tShow the tree objects in the diff output. This implies '-r'.\n \n -s::\n+--no-patch::\n \tSuppress diff output.\n endif::git-rev-list[]\ndiff --git a/diff.c b/diff.c\nindex 6578690..6bd821d 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -3551,7 +3551,7 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)\n \t\toptions->output_format |= DIFF_FORMAT_NAME;\n \telse if (!strcmp(arg, \"--name-status\"))\n \t\toptions->output_format |= DIFF_FORMAT_NAME_STATUS;\n-\telse if (!strcmp(arg, \"-s\"))\n+\telse if (!strcmp(arg, \"-s\") || !strcmp(arg, \"--no-patch\"))\n \t\toptions->output_format |= DIFF_FORMAT_NO_OUTPUT;\n \telse if (!prefixcmp(arg, \"--stat\"))\n \t\t/* --stat, --stat-width, --stat-name-width, or --stat-count */\ndiff --git a/t/t4000-diff-format.sh b/t/t4000-diff-format.sh\nindex 2b5dffc..3b9a9ae 100755\n--- a/t/t4000-diff-format.sh\n+++ b/t/t4000-diff-format.sh\n@@ -59,4 +59,16 @@ test_expect_success 'validate git diff-files -p output.' '\n \tcompare_diff_patch expected actual\n '\n \n+test_expect_success 'git diff-files -s after editing work tree' '\n+\tgit diff-files -s >actual 2>err &&\n+\ttest_must_be_empty actual &&\n+\ttest_must_be_empty err\n+'\n+\n+test_expect_success 'git diff-files --no-patch as synonym for -s' '\n+\tgit diff-files --no-patch >actual 2>err &&\n+\ttest_must_be_empty actual &&\n+\ttest_must_be_empty err\n+'\n+\n test_done\n-- \n1.8.3.1.495.g13f33cf.dirty\n"},{"id":"223506","messageId":"1373961940-31614-4-git-send-email-Matthieu.Moy@imag.fr","threadId":"34439","inReplyTo":"1373961940-31614-1-git-send-email-Matthieu.Moy@imag.fr","subject":"[PATCH v4 3/6] diff: allow --patch & cie to override -s/--no-patch","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2013-07-16T08:05:37Z","receivedAt":"2013-07-16T08:05:37Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"All options that trigger a patch output now override --no-patch.\n\nThe case of --binary deserves extra attention: the name may suggest that\nit turns a normal patch into a binary patch, but it actually already\nenables patch output when normally disabled (e.g. \"git log --binary\"\ndisplays a patch), hence it makes sense for \"git show --no-patch\n--binary\" to display the binary patch.\n\nSigned-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n---\n diff.c                 | 28 +++++++++++++++++-----------\n t/t4000-diff-format.sh | 18 ++++++++++++++++++\n 2 files changed, 35 insertions(+), 11 deletions(-)\n\ndiff --git a/diff.c b/diff.c\nindex 6bd821d..66ab714 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -3508,6 +3508,11 @@ static int parse_submodule_opt(struct diff_options *options, const char *value)\n \treturn 1;\n }\n \n+static void enable_patch_output(int *fmt) {\n+\t*fmt &= ~DIFF_FORMAT_NO_OUTPUT;\n+\t*fmt |= DIFF_FORMAT_PATCH;\n+}\n+\n int diff_opt_parse(struct diff_options *options, const char **av, int ac)\n {\n \tconst char *arg = av[0];\n@@ -3515,15 +3520,15 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)\n \tint argcount;\n \n \t/* Output format options */\n-\tif (!strcmp(arg, \"-p\") || !strcmp(arg, \"-u\") || !strcmp(arg, \"--patch\"))\n-\t\toptions->output_format |= DIFF_FORMAT_PATCH;\n-\telse if (opt_arg(arg, 'U', \"unified\", &options->context))\n-\t\toptions->output_format |= DIFF_FORMAT_PATCH;\n+\tif (!strcmp(arg, \"-p\") || !strcmp(arg, \"-u\") || !strcmp(arg, \"--patch\")\n+\t    || opt_arg(arg, 'U', \"unified\", &options->context))\n+\t\tenable_patch_output(&options->output_format);\n \telse if (!strcmp(arg, \"--raw\"))\n \t\toptions->output_format |= DIFF_FORMAT_RAW;\n-\telse if (!strcmp(arg, \"--patch-with-raw\"))\n-\t\toptions->output_format |= DIFF_FORMAT_PATCH | DIFF_FORMAT_RAW;\n-\telse if (!strcmp(arg, \"--numstat\"))\n+\telse if (!strcmp(arg, \"--patch-with-raw\")) {\n+\t\tenable_patch_output(&options->output_format);\n+\t\toptions->output_format |= DIFF_FORMAT_RAW;\n+\t} else if (!strcmp(arg, \"--numstat\"))\n \t\toptions->output_format |= DIFF_FORMAT_NUMSTAT;\n \telse if (!strcmp(arg, \"--shortstat\"))\n \t\toptions->output_format |= DIFF_FORMAT_SHORTSTAT;\n@@ -3545,9 +3550,10 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)\n \t\toptions->output_format |= DIFF_FORMAT_CHECKDIFF;\n \telse if (!strcmp(arg, \"--summary\"))\n \t\toptions->output_format |= DIFF_FORMAT_SUMMARY;\n-\telse if (!strcmp(arg, \"--patch-with-stat\"))\n-\t\toptions->output_format |= DIFF_FORMAT_PATCH | DIFF_FORMAT_DIFFSTAT;\n-\telse if (!strcmp(arg, \"--name-only\"))\n+\telse if (!strcmp(arg, \"--patch-with-stat\")) {\n+\t\tenable_patch_output(&options->output_format);\n+\t\toptions->output_format |= DIFF_FORMAT_DIFFSTAT;\n+\t} else if (!strcmp(arg, \"--name-only\"))\n \t\toptions->output_format |= DIFF_FORMAT_NAME;\n \telse if (!strcmp(arg, \"--name-status\"))\n \t\toptions->output_format |= DIFF_FORMAT_NAME_STATUS;\n@@ -3624,7 +3630,7 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)\n \n \t/* flags options */\n \telse if (!strcmp(arg, \"--binary\")) {\n-\t\toptions->output_format |= DIFF_FORMAT_PATCH;\n+\t\tenable_patch_output(&options->output_format);\n \t\tDIFF_OPT_SET(options, BINARY);\n \t}\n \telse if (!strcmp(arg, \"--full-index\"))\ndiff --git a/t/t4000-diff-format.sh b/t/t4000-diff-format.sh\nindex 3b9a9ae..8de36b7 100755\n--- a/t/t4000-diff-format.sh\n+++ b/t/t4000-diff-format.sh\n@@ -71,4 +71,22 @@ test_expect_success 'git diff-files --no-patch as synonym for -s' '\n \ttest_must_be_empty err\n '\n \n+test_expect_success 'git diff-files --no-patch --patch shows the patch' '\n+\tgit diff-files --no-patch --patch >actual &&\n+\tcompare_diff_patch expected actual\n+'\n+\n+test_expect_success 'git diff-files --no-patch --patch-with-raw shows the patch and raw data' '\n+\tgit diff-files --no-patch --patch-with-raw >actual &&\n+\tgrep -q \"^:100644 100755 .* 0000000000000000000000000000000000000000 M\tpath0\\$\" actual &&\n+\ttail -n +4 actual >actual-patch &&\n+\tcompare_diff_patch expected actual-patch\n+'\n+\n+test_expect_success 'git diff-files --patch --no-patch does not show the patch' '\n+\tgit diff-files --patch --no-patch >actual 2>err &&\n+\ttest_must_be_empty actual &&\n+\ttest_must_be_empty err\n+'\n+\n test_done\n-- \n1.8.3.1.495.g13f33cf.dirty\n"},{"id":"223508","messageId":"1373961940-31614-5-git-send-email-Matthieu.Moy@imag.fr","threadId":"34439","inReplyTo":"1373961940-31614-1-git-send-email-Matthieu.Moy@imag.fr","subject":"[PATCH v4 4/6] Documentation/git-show.txt: include common diff options, like git-log.txt","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2013-07-16T08:05:38Z","receivedAt":"2013-07-16T08:05:38Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n---\n Documentation/git-show.txt | 9 +++++++++\n 1 file changed, 9 insertions(+)\n\ndiff --git a/Documentation/git-show.txt b/Documentation/git-show.txt\nindex ae4edcc..4e617e6 100644\n--- a/Documentation/git-show.txt\n+++ b/Documentation/git-show.txt\n@@ -45,6 +45,15 @@ include::pretty-options.txt[]\n include::pretty-formats.txt[]\n \n \n+COMMON DIFF OPTIONS\n+-------------------\n+\n+:git-log: 1\n+include::diff-options.txt[]\n+\n+include::diff-generate-patch.txt[]\n+\n+\n EXAMPLES\n --------\n \n-- \n1.8.3.1.495.g13f33cf.dirty\n"},{"id":"223507","messageId":"1373961940-31614-6-git-send-email-Matthieu.Moy@imag.fr","threadId":"34439","inReplyTo":"1373961940-31614-1-git-send-email-Matthieu.Moy@imag.fr","subject":"[PATCH v4 5/6] Documentation: move description of -s, --no-patch to diff-options.txt","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2013-07-16T08:05:39Z","receivedAt":"2013-07-16T08:05:39Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"Technically, \"-s, --no-patch\" is implemented in diff.c (\"git diff\n--no-patch\" is essentially useless, but valid). From the user point of\nview, this allows the documentation to show up in \"git show --help\",\nwhich is one of the most useful use of the option.\n\nWhile we're there, add a sentence explaining why the option can be\nuseful.\n\nSigned-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n---\n Documentation/diff-options.txt     | 5 +++++\n Documentation/rev-list-options.txt | 4 ----\n 2 files changed, 5 insertions(+), 4 deletions(-)\n\ndiff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt\nindex 87e92d6..bbed2cd 100644\n--- a/Documentation/diff-options.txt\n+++ b/Documentation/diff-options.txt\n@@ -26,6 +26,11 @@ ifndef::git-format-patch[]\n \t{git-diff? This is the default.}\n endif::git-format-patch[]\n \n+-s::\n+--no-patch::\n+\tSuppress diff output. Useful for commands like `git show` that\n+\tshow the patch by default, or to cancel the effect of `--patch`.\n+\n -U<n>::\n --unified=<n>::\n \tGenerate diffs with <n> lines of context instead of\ndiff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt\nindex c128a85..e632e85 100644\n--- a/Documentation/rev-list-options.txt\n+++ b/Documentation/rev-list-options.txt\n@@ -849,8 +849,4 @@ options may be given. See linkgit:git-diff-files[1] for more options.\n -t::\n \n \tShow the tree objects in the diff output. This implies '-r'.\n-\n--s::\n---no-patch::\n-\tSuppress diff output.\n endif::git-rev-list[]\n-- \n1.8.3.1.495.g13f33cf.dirty\n"},{"id":"223504","messageId":"1373961940-31614-7-git-send-email-Matthieu.Moy@imag.fr","threadId":"34439","inReplyTo":"1373961940-31614-1-git-send-email-Matthieu.Moy@imag.fr","subject":"[PATCH v4 6/6] Documentation/git-log.txt: capitalize section names","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2013-07-16T08:05:40Z","receivedAt":"2013-07-16T08:05:40Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"This is the convention in most other files and even at the beginning of\ngit-log.txt\n\nSigned-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n---\n Documentation/git-log.txt | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/Documentation/git-log.txt b/Documentation/git-log.txt\nindex 2ea79ba..2eda5e4 100644\n--- a/Documentation/git-log.txt\n+++ b/Documentation/git-log.txt\n@@ -97,7 +97,7 @@ include::rev-list-options.txt[]\n \n include::pretty-formats.txt[]\n \n-Common diff options\n+COMMON DIFF OPTIONS\n -------------------\n \n :git-log: 1\n@@ -105,7 +105,7 @@ include::diff-options.txt[]\n \n include::diff-generate-patch.txt[]\n \n-Examples\n+EXAMPLES\n --------\n `git log --no-merges`::\n \n@@ -161,12 +161,12 @@ git log -L '/int main/',/^}/:main.c::\n `git log -3`::\n \tLimits the number of commits to show to 3.\n \n-Discussion\n+DISCUSSION\n ----------\n \n include::i18n.txt[]\n \n-Configuration\n+CONFIGURATION\n -------------\n \n See linkgit:git-config[1] for core variables and linkgit:git-diff[1]\n-- \n1.8.3.1.495.g13f33cf.dirty\n"},{"id":"223526","messageId":"20130716174636.GJ14690@google.com","threadId":"34439","inReplyTo":"1373961940-31614-1-git-send-email-Matthieu.Moy@imag.fr","subject":"Re: [PATCH v4 0/6] Make \"git show -s\" easier to discover for users","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-07-16T17:46:36Z","receivedAt":"2013-07-16T17:46:36Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Matthieu Moy wrote:\n\n> Matthieu Moy (6):\n>   t4000-diff-format.sh: modernize style\n>   diff: allow --no-patch as synonym for -s\n>   diff: allow --patch & cie to override -s/--no-patch\n>   Documentation/git-show.txt: include common diff options, like\n>     git-log.txt\n>   Documentation: move description of -s, --no-patch to diff-options.txt\n>   Documentation/git-log.txt: capitalize section names\n>\n>  Documentation/diff-options.txt     |  5 ++++\n>  Documentation/git-log.txt          |  8 +++----\n>  Documentation/git-show.txt         |  9 +++++++\n>  Documentation/rev-list-options.txt |  3 ---\n>  diff.c                             | 30 ++++++++++++++----------\n>  t/t4000-diff-format.sh             | 48 +++++++++++++++++++++++++++++++-------\n>  6 files changed, 75 insertions(+), 28 deletions(-)\n\nThanks!  I think this series is ready now.\n\nReviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n"},{"id":"223528","messageId":"51E58BE2.9040504@googlemail.com","threadId":"34439","inReplyTo":"20130716174636.GJ14690@google.com","subject":"Re: [PATCH v4 0/6] Make \"git show -s\" easier to discover for users","fromName":"Stefan Beller","fromEmail":"stefanbeller@googlemail.com","sentAt":"2013-07-16T18:07:30Z","receivedAt":"2013-07-16T18:07:30Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On 07/16/2013 07:46 PM, Jonathan Nieder wrote:\n> Matthieu Moy wrote:\n> \n>> Matthieu Moy (6):\n>>   t4000-diff-format.sh: modernize style\n>>   diff: allow --no-patch as synonym for -s\n>>   diff: allow --patch & cie to override -s/--no-patch\n>>   Documentation/git-show.txt: include common diff options, like\n>>     git-log.txt\n>>   Documentation: move description of -s, --no-patch to diff-options.txt\n>>   Documentation/git-log.txt: capitalize section names\n>>\n>>  Documentation/diff-options.txt     |  5 ++++\n>>  Documentation/git-log.txt          |  8 +++----\n>>  Documentation/git-show.txt         |  9 +++++++\n>>  Documentation/rev-list-options.txt |  3 ---\n>>  diff.c                             | 30 ++++++++++++++----------\n>>  t/t4000-diff-format.sh             | 48 +++++++++++++++++++++++++++++++-------\n>>  6 files changed, 75 insertions(+), 28 deletions(-)\n> \n> Thanks!  I think this series is ready now.\n> \n> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n\nThanks as well. :)\n\n"},{"id":"223630","messageId":"7v38rc667s.fsf@alter.siamese.dyndns.org","threadId":"34439","inReplyTo":"1373961940-31614-1-git-send-email-Matthieu.Moy@imag.fr","subject":"Re: [PATCH v4 0/6] Make \"git show -s\" easier to discover for users","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-07-18T00:51:19Z","receivedAt":"2013-07-18T00:51:19Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks.\n"}]}