git-diff-*: support "-u" as a synonym for "-p"

I'm probably not the only one whose fingers have gotten hard-wired to
use "-u" for "unified diff".
This commit is contained in:
Linus Torvalds
2005-07-08 10:45:07 -07:00
parent 0acfc97252
commit acb46f8769
3 changed files with 4 additions and 3 deletions

View File

@ -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;