summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ec0bdb6)
raw | patch | inline | side by side (parent: ec0bdb6)
author | Junio C Hamano <junkio@cox.net> | |
Mon, 6 Feb 2006 00:36:12 +0000 (16:36 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 6 Feb 2006 00:36:12 +0000 (16:36 -0800) |
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 <junkio@cox.net>
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 <junkio@cox.net>
diff-index.c | patch | blob | history |
diff --git a/diff-index.c b/diff-index.c
index bbd873ba13306ed87f89ea5a4315bfe7ce794c7e..f8a102ec1665753e078798eaaac7aca48b845995 100644 (file)
--- a/diff-index.c
+++ b/diff-index.c
/* 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)