| 1174 | } |
| 1175 | |
| 1176 | int log_tree_commit(struct rev_info *opt, struct commit *commit) |
| 1177 | { |
| 1178 | struct log_info log; |
| 1179 | int shown; |
| 1180 | /* maybe called by e.g. cmd_log_walk(), maybe stand-alone */ |
| 1181 | int no_free = opt->diffopt.no_free; |
| 1182 | |
| 1183 | log.commit = commit; |
| 1184 | log.parent = NULL; |
| 1185 | opt->loginfo = &log; |
| 1186 | opt->diffopt.no_free = 1; |
| 1187 | |
| 1188 | if (opt->track_linear && !opt->linear && !opt->reverse_output_stage) |
| 1189 | fprintf(opt->diffopt.file, "\n%s\n", opt->break_bar); |
| 1190 | shown = log_tree_diff(opt, commit, &log); |
| 1191 | if (!shown && opt->loginfo && opt->always_show_header) { |
| 1192 | log.parent = NULL; |
| 1193 | show_log(opt); |
| 1194 | shown = 1; |
| 1195 | } |
| 1196 | if (opt->track_linear && !opt->linear && opt->reverse_output_stage) |
| 1197 | fprintf(opt->diffopt.file, "\n%s\n", opt->break_bar); |
| 1198 | if (shown) |
| 1199 | show_diff_of_diff(opt); |
| 1200 | opt->loginfo = NULL; |
| 1201 | maybe_flush_or_die(opt->diffopt.file, "stdout"); |
| 1202 | opt->diffopt.no_free = no_free; |
| 1203 | |
| 1204 | diff_free(&opt->diffopt); |
| 1205 | return shown; |
| 1206 | } |
no test coverage detected