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

Function simplify_commit

revision.c:4313–4331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4311}
4312
4313enum commit_action simplify_commit(struct rev_info *revs, struct commit *commit)
4314{
4315 enum commit_action action = get_commit_action(revs, commit);
4316
4317 if (action == commit_show &&
4318 revs->prune && revs->dense && want_ancestry(revs)) {
4319 /*
4320 * --full-diff on simplified parents is no good: it
4321 * will show spurious changes from the commits that
4322 * were elided. So we save the parents on the side
4323 * when --full-diff is in effect.
4324 */
4325 if (revs->full_diff)
4326 save_parents(revs, commit);
4327 if (rewrite_parents(revs, commit, rewrite_one) < 0)
4328 return commit_error;
4329 }
4330 return action;
4331}
4332
4333static void track_linear(struct rev_info *revs, struct commit *commit)
4334{

Callers 1

get_revision_1Function · 0.85

Calls 4

get_commit_actionFunction · 0.85
want_ancestryFunction · 0.85
save_parentsFunction · 0.85
rewrite_parentsFunction · 0.85

Tested by

no test coverage detected