Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-07-08 21:45:07 +0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-08 21:45:07 +0400
commitacb46f8769dd0031a98a284e06ebc5a09b151bfd (patch)
tree82bd6a6997dd6a7e5442a2cc306bb0feaf7e8ea0 /diff-cache.c
parent0acfc9725287d21ab7478020b66f39d7ea511804 (diff)
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".
Diffstat (limited to 'diff-cache.c')
-rw-r--r--diff-cache.c3
1 files changed, 2 insertions, 1 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;
}