diff options
-rw-r--r-- | diff-cache.c | 3 | ||||
-rw-r--r-- | diff-files.c | 2 | ||||
-rw-r--r-- | diff-tree.c | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/diff-cache.c b/diff-cache.c index 603a6b7774..33b3b31779 100644 --- a/diff-cache.c +++ b/diff-cache.c @@ -193,7 +193,8 @@ int main(int argc, const char **argv) /* We accept the -r flag just to look like git-diff-tree */ continue; } - if (!strcmp(arg, "-p")) { + /* We accept the -u flag as a synonym for "-p" */ + if (!strcmp(arg, "-p") || !strcmp(arg, "-u")) { diff_output_format = DIFF_FORMAT_PATCH; continue; } diff --git a/diff-files.c b/diff-files.c index 4d60017e46..3221e31979 100644 --- a/diff-files.c +++ b/diff-files.c @@ -45,7 +45,7 @@ int main(int argc, const char **argv) int i; while (1 < argc && argv[1][0] == '-') { - if (!strcmp(argv[1], "-p")) + if (!strcmp(argv[1], "-p") || !strcmp(argv[1], "-u")) diff_output_format = DIFF_FORMAT_PATCH; else if (!strcmp(argv[1], "-q")) silent = 1; diff --git a/diff-tree.c b/diff-tree.c index 60ad2b5b6c..ea237051ee 100644 --- a/diff-tree.c +++ b/diff-tree.c @@ -438,7 +438,7 @@ int main(int argc, const char **argv) diff_setup_opt |= DIFF_SETUP_REVERSE; continue; } - if (!strcmp(arg, "-p")) { + if (!strcmp(arg, "-p") || !strcmp(arg, "-u")) { diff_output_format = DIFF_FORMAT_PATCH; recursive = 1; continue; |