+ switch (ce_stage(ce)) {
+ case 0:
+ /* No stage 1 entry? That means it's a new file */
+ if (!same) {
+ show_file("+", ce);
+ break;
+ }
+ /* Show difference between old and new */
+ show_modified(ac[1], ce);
+ break;
+ case 1:
+ /* No stage 3 (merge) entry? That means it's been deleted */
+ if (!same) {
+ show_file("-", ce);
+ break;
+ }
+ /* Otherwise we fall through to the "unmerged" case */
+ case 3:
+ printf("U %s%c", ce->name, line_termination);
+ break;
+
+ default:
+ die("impossible cache entry stage");