Re: [PATCH v11 0/7] graph: indent visual roots in graph
- From
Pablo Sabater <pabloosabaterr@gmail.com>
- Date
- Jul 13, 2026, 20:51 UTC
- Message-ID
- <DJXQO504VCLC.10N8335V7Z1LY@gmail.com>
- In-Reply-To
- <xmqqy0fews69.fsf@gitster.g>
On Mon Jul 13, 2026 at 10:28 PM CEST, Junio C Hamano wrote:
Show 8 quoted lines
> Pablo Sabater <pabloosabaterr@gmail.com> writes: > >> V9 DIFF: >> >> - Changed boolean variables to be bit fields. > > v11??? >
My bad, I updated it manually and I forgot to.
Show 29 quoted lines
>>
>> 7: 737331b68d ! 7: c1fa81022e graph: add --[no-]graph-indent and log.graphIndent
>> @@ revision.h: struct rev_info {
>> /* Display history graph */
>> struct git_graph *graph;
>> int graph_max_lanes;
>> -+ int no_graph_indent;
>> -+ unsigned int graph_indent_set;
>> ++ unsigned int no_graph_indent:1;
>> ++ unsigned int graph_indent_set:1;
>
> OK. References to these occur primarily in a boolean context, and
> all assignments to them are either 0 or 1.
>
> graph.c:442: revs->no_graph_indent = !val;
> graph.c:1008: !graph->revs->no_graph_indent;
> graph.c:1353: if (graph->is_visual_root && !graph->revs->no_graph_indent) {
> revision.c:2630: revs->no_graph_indent = 0;
> revision.c:2631: revs->graph_indent_set = 1;
> revision.c:2633: revs->no_graph_indent = 1;
> revision.c:2634: revs->graph_indent_set = 1;
> revision.c:3209: if (revs->graph_indent_set > 0 && !revs->graph)
>
> You may want to rewrite the last conditional check to:
>
> if (revs->graph_indent_set && !revs->graph)
>
> This avoids confusing readers into thinking the member can be set
> to 2 or greater.I'll do that. Thanks.
> > Thanks.
Regards, Pablo.