Re: [GSoC PATCH v5 1/2] graph: add --graph-lane-limit option
- From
Pablo <pabloosabaterr@gmail.com>
- Date
- Mar 27, 2026, 16:07 UTC
- Message-ID
- <CAN5EUNSuVNPfC5bChw7ocBJD5_ObsAvVv9Q=jaD6v_go4e9nyg@mail.gmail.com>
- In-Reply-To
- <CAN5EUNSyBjpZHHAAd1YGVRjkLwzgGzpafhBJVTTcHJCLKNU2gQ@mail.gmail.com>
Pablo (<pabloosabaterr@gmail.com>) writes:
Show 19 quoted lines
> > > + graph_line_addstr(line, "~ ");
> > > + break;
> > > + }
> > > +
> > > graph_line_write_column(line, col, (i == dashed_parents - 1) ? '.' : '-');
> > > }
> > >
> >
> > > + if (graph->num_parents > 1) {
> > > + if (!graph_needs_truncation(graph, graph->commit_index)) {
> > > + graph_update_state(graph, GRAPH_POST_MERGE);
> > > + } else {
> > > + struct commit_list *first_parent = first_interesting_parent(graph);
> > > + int first_parent_col = graph_find_new_column_by_commit(graph, first_parent->item);
> >
> > Are we sure that first_interesting_parent() will always give us a
> > non-NULL pointer?
>
> my bad, first_interestign_parent() can be a NULL, will add a check for thatActually, I've been looking and first_interesting_parent() can't return NULL here because: num_parents is counted using first_interesting_parent()/next_interesting_parent() so if num_parents
> 1 it guarantees that first_interesting_parent() is non-NULL. I'll
add a BUG() to have it reflected on the code.
Pablo