Skip to content

Commit

Permalink
diff-index: make --cc a synonym for -p for now.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Feb 6, 2006
1 parent ec0bdb6 commit 4abd896
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions diff-index.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4abd896

Please sign in to comment.