summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0acfc97)
raw | patch | inline | side by side (parent: 0acfc97)
author | Linus Torvalds <torvalds@g5.osdl.org> | |
Fri, 8 Jul 2005 17:45:07 +0000 (10:45 -0700) | ||
committer | Linus Torvalds <torvalds@g5.osdl.org> | |
Fri, 8 Jul 2005 17:45:07 +0000 (10:45 -0700) |
I'm probably not the only one whose fingers have gotten hard-wired to
use "-u" for "unified diff".
use "-u" for "unified diff".
diff-cache.c | patch | blob | history | |
diff-files.c | patch | blob | history | |
diff-tree.c | patch | blob | history |
diff --git a/diff-cache.c b/diff-cache.c
index 603a6b7774e6de19bc2b80299e30fb801d8fd773..33b3b3177990a42f06cf2e5723f22188f993ae30 100644 (file)
--- a/diff-cache.c
+++ b/diff-cache.c
/* 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 4d60017e46b1aa54ea07a85b478592408dc34233..3221e319798c46b6208da54b23232b9ec4a048d2 100644 (file)
--- a/diff-files.c
+++ b/diff-files.c
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 60ad2b5b6cd94b9026882ff6e353a846f02c7851..ea237051ee5e5249f8096ae75b188b6b7a55011a 100644 (file)
--- a/diff-tree.c
+++ b/diff-tree.c
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;