summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorWill Palmer <wmpalmer@gmail.com>2010-05-13 08:59:00 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-05-19 04:50:03 (GMT)
commit1c9eecff97beab2d425397dc624281dff5c0be5c (patch)
treedf7ad0e5a7ea02db25aa2593516eb492800aa092 /diff.c
parent67687feae52ff2d3ab7edf3ac42a39c5e44be299 (diff)
downloadgit-1c9eecff97beab2d425397dc624281dff5c0be5c.zip
git-1c9eecff97beab2d425397dc624281dff5c0be5c.tar.gz
git-1c9eecff97beab2d425397dc624281dff5c0be5c.tar.bz2
diff-options: make --patch a synonym for -p
Here we simply make --patch a synonym for -p, whose mnemonic was "patch" all along. Signed-off-by: Will Palmer <wmpalmer@gmail.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/diff.c b/diff.c
index e49f14a..43a313d 100644
--- a/diff.c
+++ b/diff.c
@@ -2701,7 +2701,7 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
const char *arg = av[0];
/* Output format options */
- if (!strcmp(arg, "-p") || !strcmp(arg, "-u"))
+ if (!strcmp(arg, "-p") || !strcmp(arg, "-u") || !strcmp(arg, "--patch"))
options->output_format |= DIFF_FORMAT_PATCH;
else if (opt_arg(arg, 'U', "unified", &options->context))
options->output_format |= DIFF_FORMAT_PATCH;