Re: [PATCH] graph API: fix bug in graph_is_interesting()
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 19, 2009, 06:18 UTC
- Message-ID
- <7vhbw41g3f.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20090819023433.GP8147@facebook.com>
Adam Simpkins <simpkins@facebook.com> writes:
Show 25 quoted lines
> -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?