From: Junio C Hamano Date: Mon, 6 Feb 2006 00:36:12 +0000 (-0800) Subject: diff-index: make --cc a synonym for -p for now. X-Git-Tag: v1.2.0~60 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4abd89648eb40384556e2118e74be03325d0b05d;p=git.git diff-index: make --cc a synonym for -p for now. It could be made later to show unmerged state nicer than the default as we did for diff-files later, but this would suffice for now. We would like to make --cc the default for 'git diff'. Signed-off-by: Junio C Hamano --- diff --git a/diff-index.c b/diff-index.c index bbd873ba1..f8a102ec1 100644 --- a/diff-index.c +++ b/diff-index.c @@ -201,6 +201,14 @@ int main(int argc, const char **argv) /* We accept the -r flag just to look like git-diff-tree */ continue; } + if (!strcmp(arg, "--cc")) + /* + * I _think_ "diff-index --cached HEAD" with an + * unmerged index could show something else + * later, but pretend --cc is the same as -p for + * now. "git diff" uses --cc by default. + */ + argv[i] = arg = "-p"; diff_opt_cnt = diff_opt_parse(&diff_options, argv + i, argc - i); if (diff_opt_cnt < 0)