Teach diff -a as shorthand for --text
authorStephan Feder <sf@b-i-t.de>
Fri, 7 Jul 2006 13:57:07 +0000 (15:57 +0200)
committerJunio C Hamano <junkio@cox.net>
Fri, 7 Jul 2006 19:28:04 +0000 (12:28 -0700)
Signed-off-by: Stephan Feder <sf@b-i-t.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
diff.c
diff --git a/diff.c b/diff.c
index 1f0219dbe40e6c750766d8c7694af47fbdc854d2..b423491f60e7c0dc397e9db9a6864cd3903e2f28 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -1561,7 +1561,7 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
                options->output_format |= DIFF_FORMAT_PATCH;
                options->full_index = options->binary = 1;
        }
-       else if (!strcmp(arg, "--text")) {
+       else if (!strcmp(arg, "-a") || !strcmp(arg, "--text")) {
                options->text = 1;
        }
        else if (!strcmp(arg, "--name-only"))