From: Junio C Hamano Date: Mon, 13 Jul 2026 20:28:14 GMT Subject: Re: [PATCH v11 0/7] graph: indent visual roots in graph Message-ID: In-Reply-To: <20260713-ps-pre-commit-indent-v11-0-dcb65bc4ba99@gmail.com> Pablo Sabater writes: > V9 DIFF: > > - Changed boolean variables to be bit fields. v11??? > > 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. Thanks.