| 1226 | } |
| 1227 | |
| 1228 | static void show_raw_diff(struct combine_diff_path *p, int num_parent, struct rev_info *rev) |
| 1229 | { |
| 1230 | struct diff_options *opt = &rev->diffopt; |
| 1231 | int line_termination, inter_name_termination, i; |
| 1232 | const char *line_prefix = diff_line_prefix(opt); |
| 1233 | |
| 1234 | line_termination = opt->line_termination; |
| 1235 | inter_name_termination = '\t'; |
| 1236 | if (!line_termination) |
| 1237 | inter_name_termination = 0; |
| 1238 | |
| 1239 | if (rev->loginfo && !rev->no_commit_id) |
| 1240 | show_log(rev); |
| 1241 | |
| 1242 | |
| 1243 | if (opt->output_format & DIFF_FORMAT_RAW) { |
| 1244 | printf("%s", line_prefix); |
| 1245 | |
| 1246 | /* As many colons as there are parents */ |
| 1247 | for (i = 0; i < num_parent; i++) |
| 1248 | putchar(':'); |
| 1249 | |
| 1250 | /* Show the modes */ |
| 1251 | for (i = 0; i < num_parent; i++) |
| 1252 | printf("%06o ", p->parent[i].mode); |
| 1253 | printf("%06o", p->mode); |
| 1254 | |
| 1255 | /* Show sha1's */ |
| 1256 | for (i = 0; i < num_parent; i++) |
| 1257 | printf(" %s", diff_aligned_abbrev(&p->parent[i].oid, |
| 1258 | opt->abbrev)); |
| 1259 | printf(" %s ", diff_aligned_abbrev(&p->oid, opt->abbrev)); |
| 1260 | } |
| 1261 | |
| 1262 | if (opt->output_format & (DIFF_FORMAT_RAW | DIFF_FORMAT_NAME_STATUS)) { |
| 1263 | for (i = 0; i < num_parent; i++) |
| 1264 | putchar(p->parent[i].status); |
| 1265 | putchar(inter_name_termination); |
| 1266 | } |
| 1267 | |
| 1268 | for (i = 0; i < num_parent; i++) |
| 1269 | if (rev->combined_all_paths) { |
| 1270 | const char *path = p->parent[i].path ? |
| 1271 | p->parent[i].path : |
| 1272 | p->path; |
| 1273 | write_name_quoted(path, stdout, inter_name_termination); |
| 1274 | } |
| 1275 | write_name_quoted(p->path, stdout, line_termination); |
| 1276 | } |
| 1277 | |
| 1278 | /* |
| 1279 | * The result (p->elem) is from the working tree and their |
no test coverage detected