notes: handle multiple worktrees
[gitweb.git] / line-log.c
index 038c58a395c6804e5f719d4d82a3d4edbd6d8901..b7864ad5869eb076e778c352e2f64666dc77a525 100644 (file)
@@ -1141,6 +1141,9 @@ static int process_ranges_merge_commit(struct rev_info *rev, struct commit *comm
        int i;
        int nparents = commit_list_count(commit->parents);
 
+       if (nparents > 1 && rev->first_parent_only)
+               nparents = 1;
+
        diffqueues = xmalloc(nparents * sizeof(*diffqueues));
        cand = xmalloc(nparents * sizeof(*cand));
        parents = xmalloc(nparents * sizeof(*parents));