for (p = commit->parents; p; p = p->next) {
pst = locate_simplify_state(revs, p->item);
p->item = pst->simplified;
+ if (revs->first_parent_only)
+ break;
}
- if (!revs->first_parent_only)
- cnt = remove_duplicate_parents(commit);
- else
+
- /*
- * A merge with a tree-same parent is useless
- */
- if (commit->parents && commit->parents->next)
- remove_treesame_parents(commit);
++ if (revs->first_parent_only) {
+ cnt = 1;
++ } else {
++ /*
++ * A merge with a tree-same parent is useless
++ */
++ if (commit->parents && commit->parents->next)
++ remove_treesame_parents(commit);
+
- cnt = remove_duplicate_parents(commit);
++ cnt = remove_duplicate_parents(commit);
++ }
/*
* It is possible that we are a merge and one side branch