MCPcopy Index your code
hub / github.com/git/git / log_tree_commit

Function log_tree_commit

log-tree.c:1176–1206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1174}
1175
1176int 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}

Callers 7

print_commit_summaryFunction · 0.85
make_patchFunction · 0.85
write_commit_patchFunction · 0.85
cmd_log_walk_no_freeFunction · 0.85
cmd_format_patchFunction · 0.85
diff_tree_commit_oidFunction · 0.85
stdin_diff_commitFunction · 0.85

Calls 5

log_tree_diffFunction · 0.85
show_logFunction · 0.85
show_diff_of_diffFunction · 0.85
maybe_flush_or_dieFunction · 0.85
diff_freeFunction · 0.85

Tested by

no test coverage detected