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 <junkio@cox.net>
Junio C Hamano committed
Feb 5, 2006 at 16:36 UTC
4abd89648eb40384556e2118e74be03325d0b05d
1 file changed
+8
diff-index.c
+8
@@ -201,6 +201,14 @@ int main(int argc, const char **argv)
201
/* We accept the -r flag just to look like git-diff-tree */
202
continue;
203
}
204
+ if (!strcmp(arg, "--cc"))
205
+ /*
206
+ * I _think_ "diff-index --cached HEAD" with an
207
+ * unmerged index could show something else
208
+ * later, but pretend --cc is the same as -p for
209
+ * now. "git diff" uses --cc by default.
210
+ */
211
+ argv[i] = arg = "-p";
212
diff_opt_cnt = diff_opt_parse(&diff_options, argv + i,
213
argc - i);
214
if (diff_opt_cnt < 0)