{"thread":{"id":"23791","subject":"[PATCH/RFC resend] diff-options: make --patch a synonym for -p","startedAt":"2010-05-13T08:59:00Z","lastAt":"2010-05-13T11:45:54Z","messageCount":3,"participants":["Will Palmer","Matthieu Moy","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"141564","messageId":"1273741140.2516.15.camel@wpalmer.simply-domain","threadId":"23791","inReplyTo":null,"subject":"[PATCH/RFC resend] diff-options: make --patch a synonym for -p","fromName":"Will Palmer","fromEmail":"wmpalmer@gmail.com","sentAt":"2010-05-13T08:59:00Z","receivedAt":"2010-05-13T08:59:00Z","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\nRe-sending, as this seems to have slipped under the radar last time.\nIn case a justification is non-obvious: -p has always meant \"patch\", and the\nsynonym (-u) has a long-form. I always find myself typing out the long-form\n--patch, only to be surprised that it doesn't exist. This patch seeks to\ncorrect what I can only assume was an oversight.\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"},{"id":"141572","messageId":"vpqzl04ghdv.fsf@bauges.imag.fr","threadId":"23791","inReplyTo":"1273741140.2516.15.camel@wpalmer.simply-domain","subject":"Re: [PATCH/RFC resend] diff-options: make --patch a synonym for -p","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2010-05-13T11:39:40Z","receivedAt":"2010-05-13T11:39:40Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Will Palmer <wmpalmer@gmail.com> writes:\n\n> Re-sending, as this seems to have slipped under the radar last time.\n> In case a justification is non-obvious: -p has always meant \"patch\", and the\n> synonym (-u) has a long-form. I always find myself typing out the long-form\n> --patch, only to be surprised that it doesn't exist. This patch seeks to\n> correct what I can only assume was an oversight.\n\nAgreed. I'll still type -p, but explaining to newbies \"git log --patch\"\nis self-explanatory, while \"git log -p\" is non-obvious, especially\nwhen it's different from \"git -p log\"...\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"141574","messageId":"20100513114554.GA10963@coredump.intra.peff.net","threadId":"23791","inReplyTo":"1273741140.2516.15.camel@wpalmer.simply-domain","subject":"Re: [PATCH/RFC resend] diff-options: make --patch a synonym for -p","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-05-13T11:45:54Z","receivedAt":"2010-05-13T11:45:54Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, May 13, 2010 at 09:59:00AM +0100, Will Palmer wrote:\n\n> Here we simply make --patch a synonym for -p, whose mnemonic was \"patch\"\n> all along.\n\nYeah, makes sense to me. We already have --patch-with-stat and\n--patch-with-raw (even though they are just historical), so clearly\n--patch is the obvious choice.\n\n> Re-sending, as this seems to have slipped under the radar last time.\n\nJunio is incommunicado for a bit. I don't know how able he'll be to comb\nthrough the list once he gets back, so you may need to an eye out and\nresend again in a week or so. :)\n\n-Peff\n"}]}