Re: [PATCH] graph API: fix bug in graph_is_interesting()
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:16
Adam Simpkins [off-list ref] writes:
quoted hunk
-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?