Re: [PATCH 2/6] commit-graph.h: store object directory in 'struct commit_graph'
Martin Ågren <martin.agren@gmail.com> writes:
Show 13 quoted lines
>> + struct object_directory *odb;
>> + if ((odb = find_odb(the_repository, opts.obj_dir)))
>> + graph = read_commit_graph_one(the_repository, odb);
>> + }
>
> I'm a tiny bit allergic to this assignment-within-if. It's wrapped by
> another pair of parentheses, which both compilers and humans know to
> interpret as "trust me, this is not a mistake", but I still find this
> easier to read:
>
> odb = find_odb(...);
> if (odb)
> ....