{"thread":{"id":"23724","subject":"[PATCH] diff-options: make --patch a synonym for -p","startedAt":"2010-05-06T22:42:44Z","lastAt":"2010-05-06T22:42:44Z","messageCount":1,"participants":["Will Palmer"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"141098","messageId":"1273185764-9907-1-git-send-email-wmpalmer@gmail.com","threadId":"23724","inReplyTo":null,"subject":"[PATCH] diff-options: make --patch a synonym for -p","fromName":"Will Palmer","fromEmail":"wmpalmer@gmail.com","sentAt":"2010-05-06T22:42:44Z","receivedAt":"2010-05-06T22:42:44Z","isPatch":true,"sender":{"key":"wmpalmer@gmail.com","avatar":"https://avatars.githubusercontent.com/u/357044?v=4"},"body":"Here we simply make --patch a synonym for -p, whose mnemonic was \"patch\"\nall along.\n\nSigned-off-by: Will Palmer <wmpalmer@gmail.com>\n---\n Documentation/diff-options.txt |    1 +\n diff.c                         |    2 +-\n 2 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt\nindex c9c6c2b..4a96859 100644\n--- a/Documentation/diff-options.txt\n+++ b/Documentation/diff-options.txt\n@@ -21,6 +21,7 @@ endif::git-format-patch[]\n ifndef::git-format-patch[]\n -p::\n -u::\n+--patch::\n \tGenerate patch (see section on generating patches).\n \t{git-diff? This is the default.}\n endif::git-format-patch[]\ndiff --git a/diff.c b/diff.c\nindex d0ecbc3..8ea9f97 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -2722,7 +2722,7 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)\n \tconst char *arg = av[0];\n \n \t/* Output format options */\n-\tif (!strcmp(arg, \"-p\") || !strcmp(arg, \"-u\"))\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-- \n1.7.1.rc1.12.ga6018.dirty\n"}]}