Junio C Hamano <gitster@xxxxxxxxx> writes: > Adam Simpkins <simpkins@xxxxxxxxxxxx> writes: > >> -enum commit_action simplify_commit(struct rev_info *revs, struct commit *commit) >> +enum commit_action get_commit_action(struct rev_info *revs, struct commit *commit) >> { >> if (commit->object.flags & SHOWN) >> return commit_ignore; >> @@ -1692,12 +1692,21 @@ enum commit_action simplify_commit(struct rev_info *revs, struct commit *commit) >> if (!commit->parents || !commit->parents->next) >> return commit_ignore; >> } >> - if (want_ancestry(revs) && rewrite_parents(revs, commit) < 0) >> - return commit_error; >> } >> return commit_show; >> } >> >> +enum commit_action simplify_commit(struct rev_info *revs, struct commit *commit) >> +{ >> + enum commit_action action = get_commit_action(revs, commit); >> + >> + if (action == commit_show && revs->prune && revs->dense && want_ancestry(revs)) { >> + if (rewrite_parents(revs, commit) < 0) >> + return commit_error; >> + } >> + return action; >> +} > > When simplify_commit() logic (now called get_comit_action()) decides to > show this commit because revs->show_all was specified, we did not rewrite > its parents, but now we will? That is, here is what I meant... revision.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/revision.c b/revision.c index 15a2010..efa3b7c 100644 --- a/revision.c +++ b/revision.c @@ -1700,7 +1700,9 @@ enum commit_action simplify_commit(struct rev_info *revs, struct commit *commit) { enum commit_action action = get_commit_action(revs, commit); - if (action == commit_show && revs->prune && revs->dense && want_ancestry(revs)) { + if (action == commit_show && + !revs->show_all && + revs->prune && revs->dense && want_ancestry(revs)) { if (rewrite_parents(revs, commit) < 0) return commit_error; } We may want to add some tests to demonstrate the breakage this fix addresses. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html